multi: allow skipping the PSBT finalize step
The FundingPsbtFinalize step is a safety measure that assures the final signed funding transaction has the same TXID as was registered during the funding flow and was used for the commitment transactions. This step is cumbersome to use if the whole funding process is completed external to lnd. We allow the finalize step to be skipped for such cases. The API user/script will need to make sure things are verified (and possibly cleaned up) properly.
This commit is contained in:
9 files changed
+1882
-1760
No files matched your search
+2
-2
@@ -126,7 +126,7 @@ type Wallet interface {
|
||||
// PsbtFundingVerify looks up a previously registered funding intent by
|
||||
// its pending channel ID and tries to advance the state machine by
|
||||
// verifying the passed PSBT.
|
||||
PsbtFundingVerify([32]byte, *psbt.Packet) error
|
||||
PsbtFundingVerify([32]byte, *psbt.Packet, bool) error
|
||||
|
||||
// PsbtFundingFinalize looks up a previously registered funding intent
|
||||
// by its pending channel ID and tries to advance the state machine by
|
||||
@@ -355,7 +355,7 @@ func (b *Batcher) BatchFund(ctx context.Context,
|
||||
// each of the channels.
|
||||
for _, channel := range b.channels {
|
||||
err = b.cfg.Wallet.PsbtFundingVerify(
|
||||
channel.pendingChanID, unsignedPacket,
|
||||
channel.pendingChanID, unsignedPacket, false,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error verifying PSBT: %v", err)
|
||||
|
||||
Reference in new issue
Block a user