Skip to content

Commit

Permalink
multi: rename MintingKeys in diff engine and uni to UniverseLeafKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
ffranr committed Sep 26, 2023
1 parent 864f506 commit d387a3f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -2657,7 +2657,7 @@ func (r *rpcServer) AssetLeafKeys(ctx context.Context,
// TODO(roasbeef): tell above if was tring or not, then would set
// below diff

leafKeys, err := r.cfg.BaseUniverse.MintingKeys(ctx, universeID)
leafKeys, err := r.cfg.BaseUniverse.UniverseLeafKeys(ctx, universeID)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions universe/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,9 @@ func (a *MintingArchive) FetchIssuanceProof(ctx context.Context, id Identifier,
return a.cfg.Multiverse.FetchProofLeaf(ctx, id, key)
}

// MintingKeys returns the set of minting keys known for the specified base
// UniverseLeafKeys returns the set of leaf keys known for the specified
// universe identifier.
func (a *MintingArchive) MintingKeys(ctx context.Context,
func (a *MintingArchive) UniverseLeafKeys(ctx context.Context,
id Identifier) ([]LeafKey, error) {

log.Debugf("Retrieving all keys for Universe: id=%v", id.StringForLog())
Expand Down
4 changes: 2 additions & 2 deletions universe/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,8 @@ type DiffEngine interface {
// RootNodes returns the set of root nodes for all known universes.
RootNodes(ctx context.Context) ([]BaseRoot, error)

// MintingKeys returns all the keys inserted in the universe.
MintingKeys(ctx context.Context, id Identifier) ([]LeafKey, error)
// UniverseLeafKeys returns all the keys inserted in the universe.
UniverseLeafKeys(ctx context.Context, id Identifier) ([]LeafKey, error)

// FetchIssuanceProof attempts to fetch an issuance proof for the
// target base leaf based on the universe identifier (assetID/groupKey).
Expand Down
4 changes: 2 additions & 2 deletions universe/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ func (s *SimpleSyncer) syncRoot(ctx context.Context, remoteRoot BaseRoot,

// Otherwise, we'll need to perform a diff operation to find the set of
// keys we need to fetch.
remoteUniKeys, err := diffEngine.MintingKeys(ctx, uniID)
remoteUniKeys, err := diffEngine.UniverseLeafKeys(ctx, uniID)
if err != nil {
return err
}
localUniKeys, err := s.cfg.LocalDiffEngine.MintingKeys(ctx, uniID)
localUniKeys, err := s.cfg.LocalDiffEngine.UniverseLeafKeys(ctx, uniID)
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions universe_rpc_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ func (r *RpcUniverseDiff) RootNode(ctx context.Context,
return unmarshalUniverseRoot(universeRoot.AssetRoot)
}

// MintingKeys returns all the keys inserted in the universe.
func (r *RpcUniverseDiff) MintingKeys(ctx context.Context,
// UniverseLeafKeys returns all the keys inserted in the universe.
func (r *RpcUniverseDiff) UniverseLeafKeys(ctx context.Context,
id universe.Identifier) ([]universe.LeafKey, error) {

assetKeys, err := r.conn.AssetLeafKeys(ctx, marshalUniID(id))
Expand Down

0 comments on commit d387a3f

Please sign in to comment.