@@ -937,12 +937,10 @@ type WalletFundPsbt = func(ctx context.Context,
937
937
// (all outputs need to hold some BTC to not be dust), and with a dummy script.
938
938
// We need to use a dummy script as we can't know the actual script key since
939
939
// that's dependent on the genesis outpoint.
940
- func fundGenesisPsbt (ctx context.Context ,
941
- pendingBatch * MintingBatch , batchKey asset.SerializedKey ,
940
+ func fundGenesisPsbt (ctx context.Context , pendingBatch * MintingBatch ,
942
941
walletFundPsbt WalletFundPsbt ) (FundedMintAnchorPsbt , error ) {
943
942
944
943
var zero FundedMintAnchorPsbt
945
- log .Infof ("Attempting to fund batch: %x" , batchKey )
946
944
947
945
// If universe commitments are enabled, we formulate a pre-commitment
948
946
// output. This output is spent by the universe commitment transaction.
@@ -994,7 +992,6 @@ func fundGenesisPsbt(ctx context.Context,
994
992
"funded anchor transaction" )
995
993
}
996
994
997
- log .Infof ("Funded GenesisPacket for batch: %x" , batchKey )
998
995
log .Tracef ("GenesisPacket: %v" , spew .Sdump (fundedGenesisPkt ))
999
996
1000
997
// Classify anchor transaction output indexes.
@@ -2044,14 +2041,16 @@ func (c *ChainPlanter) fundBatch(ctx context.Context, params FundParams,
2044
2041
return * fundedPkt , nil
2045
2042
}
2046
2043
2044
+ log .Infof ("Attempting to fund batch: %x" , batchKey )
2047
2045
mintAnchorTx , err := fundGenesisPsbt (
2048
- ctx , c .pendingBatch , batchKey , walletFundPsbt ,
2046
+ ctx , c .pendingBatch , walletFundPsbt ,
2049
2047
)
2050
2048
if err != nil {
2051
2049
return fmt .Errorf ("unable to fund minting PSBT for " +
2052
2050
"batch: %x %w" , batchKey [:], err )
2053
2051
}
2054
2052
2053
+ log .Infof ("Funded GenesisPacket for batch: %x" , batchKey )
2055
2054
batch .GenesisPacket = & mintAnchorTx
2056
2055
2057
2056
return nil
0 commit comments