Skip to content

Commit fc253e2

Browse files
committed
universe: rename BaseBackend.MintingLeaves to FetchLeaves
Renamed method to better reflect its broader usage. It now applies to both issuance proof leaves and transfer proof leaves.
1 parent cd3e5cc commit fc253e2

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

tapdb/universe.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,8 +1050,8 @@ func (b *BaseUniverseTree) MintingKeys(ctx context.Context,
10501050
return leafKeys, nil
10511051
}
10521052

1053-
// MintingLeaves returns all the minting leaves inserted into the universe.
1054-
func (b *BaseUniverseTree) MintingLeaves(
1053+
// FetchLeaves retrieves all leaves from the universe tree.
1054+
func (b *BaseUniverseTree) FetchLeaves(
10551055
ctx context.Context) ([]universe.Leaf, error) {
10561056

10571057
var leaves []universe.Leaf

tapdb/universe_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ func TestUniverseIssuanceProofs(t *testing.T) {
378378

379379
// We should be able to query for the complete set of leaves,
380380
// which matches what we inserted above.
381-
dbLeaves, err := baseUniverse.MintingLeaves(ctx)
381+
dbLeaves, err := baseUniverse.FetchLeaves(ctx)
382382
require.NoError(t, err)
383383
require.Equal(t, numLeaves, len(dbLeaves))
384384
require.True(t, fn.All(dbLeaves, func(leaf universe.Leaf) bool {
@@ -441,7 +441,7 @@ func TestUniverseIssuanceProofs(t *testing.T) {
441441
require.NoError(t, err)
442442
require.Len(t, mintingKeys, 0)
443443

444-
dbLeaves, err = baseUniverse.MintingLeaves(ctx)
444+
dbLeaves, err = baseUniverse.FetchLeaves(ctx)
445445
require.NoError(t, err)
446446
require.Len(t, dbLeaves, 0)
447447

universe/archive.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ func (a *Archive) FetchLeaves(ctx context.Context,
706706

707707
return withUni(
708708
a, id, func(uni BaseBackend) ([]Leaf, error) {
709-
return uni.MintingLeaves(ctx)
709+
return uni.FetchLeaves(ctx)
710710
},
711711
)
712712
}

universe/interface.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,8 @@ type BaseBackend interface {
427427
MintingKeys(ctx context.Context,
428428
q UniverseLeafKeysQuery) ([]LeafKey, error)
429429

430-
// MintingLeaves returns all the minting leaves inserted into the
431-
// universe.
432-
MintingLeaves(ctx context.Context) ([]Leaf, error)
430+
// FetchLeaves retrieves all leaves from the universe tree.
431+
FetchLeaves(ctx context.Context) ([]Leaf, error)
433432

434433
// DeleteUniverse deletes all leaves, and the root, for a given base
435434
// universe.

0 commit comments

Comments
 (0)