mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 22:50:58 +02:00
chanbackup: add Single.CloseTxInputs field
The field is optional. It stores inputs needed to produce signed commit tx using chantools scbforceclose, which calls function GetSignedCommitTx. New backups have this field filled if commit tx is available (for all cases except when DLP is active). If a backup has this data, the field is filled from it, otherwise it is kept empty. Modified test function genRandomOpenChannelShell to cover new types of channels (simple taproot channel and custom channel) and to cover combinations of bits. Make sure that TapscriptRoot field is properly packed and unpacked.
This commit is contained in:
@@ -267,9 +267,10 @@ func (s *SubSwapper) backupUpdater() {
|
||||
log.Debugf("Adding channel %v to backup state",
|
||||
newChan.FundingOutpoint)
|
||||
|
||||
s.backupState[newChan.FundingOutpoint] = NewSingle(
|
||||
single := NewSingle(
|
||||
newChan.OpenChannel, newChan.Addrs,
|
||||
)
|
||||
s.backupState[newChan.FundingOutpoint] = single
|
||||
}
|
||||
|
||||
// For all closed channels, we'll remove the prior
|
||||
|
Reference in New Issue
Block a user