Skip to content

tapchannel: ensure genesis proofs for input assets already known #1029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions address/book.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ func NewBook(cfg BookConfig) *Book {
}
}

// queryAssetInfo attempts to locate asset genesis information by querying
// QueryAssetInfo attempts to locate asset genesis information by querying
// geneses already known to this node. If asset issuance was not previously
// verified, we then query universes in our federation for issuance proofs.
func (b *Book) queryAssetInfo(ctx context.Context,
func (b *Book) QueryAssetInfo(ctx context.Context,
id asset.ID) (*asset.AssetGroup, error) {

// Check if we know of this asset ID already.
Expand Down Expand Up @@ -262,7 +262,7 @@ func (b *Book) NewAddress(ctx context.Context, addrVersion Version,

// Before we proceed and make new keys, make sure that we actually know
// of this asset ID, or can import it.
if _, err := b.queryAssetInfo(ctx, assetID); err != nil {
if _, err := b.QueryAssetInfo(ctx, assetID); err != nil {
return nil, fmt.Errorf("unable to make address for unknown "+
"asset %x: %w", assetID[:], err)
}
Expand Down Expand Up @@ -300,7 +300,7 @@ func (b *Book) NewAddressWithKeys(ctx context.Context, addrVersion Version,
// Before we proceed, we'll make sure that the asset group is known to
// the local store. Otherwise, we can't make an address as we haven't
// bootstrapped it.
assetGroup, err := b.queryAssetInfo(ctx, assetID)
assetGroup, err := b.QueryAssetInfo(ctx, assetID)
if err != nil {
return nil, err
}
Expand Down
1 change: 1 addition & 0 deletions tapcfg/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ func genServerConfig(cfg *Config, cfgLogger btclog.Logger,
RfqManager: rfqManager,
TxSender: chainPorter,
DefaultCourierAddr: proofCourierAddr,
AssetSyncer: addrBook,
},
)
auxTrafficShaper := tapchannel.NewAuxTrafficShaper(
Expand Down
Loading
Loading