Skip to content

Commit

Permalink
tapdb: rename multiverse store FetchIssuanceProof to FetchProofLeaf
Browse files Browse the repository at this point in the history
  • Loading branch information
ffranr committed Sep 21, 2023
1 parent e42ed50 commit e7beb2f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions tapdb/multiverse.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ func (b *MultiverseStore) RootNodes(
return uniRoots, nil
}

// FetchIssuanceProof returns an issuance proof for the target key. If the key
// doesn't have a script key specified, then all the proofs for the minting
// outpoint will be returned. If neither are specified, then proofs for all the
// inserted leaves will be returned.
func (b *MultiverseStore) FetchIssuanceProof(ctx context.Context,
// FetchProofLeaf returns a proof leaf for the target key. If the key
// doesn't have a script key specified, then all the proof leafs for the minting
// outpoint will be returned. If neither are specified, then all inserted proof
// leafs will be returned.
func (b *MultiverseStore) FetchProofLeaf(ctx context.Context,
id universe.Identifier,
universeKey universe.BaseKey) ([]*universe.IssuanceProof, error) {

Expand Down
6 changes: 3 additions & 3 deletions universe/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (a *MintingArchive) RegisterIssuance(ctx context.Context, id Identifier,

// We'll first check to see if we already know of this leaf within the
// multiverse. If so, then we'll return the existing issuance proof.
issuanceProofs, err := a.cfg.Multiverse.FetchIssuanceProof(ctx, id, key)
issuanceProofs, err := a.cfg.Multiverse.FetchProofLeaf(ctx, id, key)
switch {
case err == nil && len(issuanceProofs) > 0:
issuanceProof := issuanceProofs[0]
Expand Down Expand Up @@ -347,7 +347,7 @@ func (a *MintingArchive) getPrevAssetSnapshot(ctx context.Context,
ScriptKey: &prevScriptKey,
}

prevProofs, err := a.cfg.Multiverse.FetchIssuanceProof(
prevProofs, err := a.cfg.Multiverse.FetchProofLeaf(
ctx, uniID, prevBaseKey,
)
if err != nil {
Expand Down Expand Up @@ -390,7 +390,7 @@ func (a *MintingArchive) FetchIssuanceProof(ctx context.Context, id Identifier,
}()
}()

return a.cfg.Multiverse.FetchIssuanceProof(ctx, id, key)
return a.cfg.Multiverse.FetchProofLeaf(ctx, id, key)
}

// MintingKeys returns the set of minting keys known for the specified base
Expand Down
10 changes: 5 additions & 5 deletions universe/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,11 @@ type MultiverseArchive interface {
// base key(s).
RegisterBatchIssuance(ctx context.Context, items []*IssuanceItem) error

// FetchIssuanceProof returns an issuance proof for the target key. If
// the key doesn't have a script key specified, then all the proofs for
// the minting outpoint will be returned. If neither are specified, then
// proofs for all the inserted leaves will be returned.
FetchIssuanceProof(ctx context.Context, id Identifier,
// FetchProofLeaf returns a proof leaf for the target key. If the key
// doesn't have a script key specified, then all the proof leafs for the
// minting outpoint will be returned. If neither are specified, then all
// inserted proof leafs will be returned.
FetchProofLeaf(ctx context.Context, id Identifier,
key BaseKey) ([]*IssuanceProof, error)

// TODO(roasbeef): other stats stuff here, like total number of assets, etc
Expand Down

0 comments on commit e7beb2f

Please sign in to comment.