mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +02:00
chanbackup: support backup restore of script enforced leased channels
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
974fc346cf
commit
0b0dd65c93
@@ -149,6 +149,12 @@ func (c *chanDBRestorer) openChannelShell(backup chanbackup.Single) (
|
||||
chanType |= channeldb.AnchorOutputsBit
|
||||
chanType |= channeldb.SingleFunderTweaklessBit
|
||||
|
||||
case chanbackup.ScriptEnforcedLeaseVersion:
|
||||
chanType = channeldb.LeaseExpirationBit
|
||||
chanType |= channeldb.ZeroHtlcTxFeeBit
|
||||
chanType |= channeldb.AnchorOutputsBit
|
||||
chanType |= channeldb.SingleFunderTweaklessBit
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown Single version: %v", err)
|
||||
}
|
||||
@@ -172,6 +178,7 @@ func (c *chanDBRestorer) openChannelShell(backup chanbackup.Single) (
|
||||
RemoteCurrentRevocation: backup.RemoteNodePub,
|
||||
RevocationStore: shachain.NewRevocationStore(),
|
||||
RevocationProducer: shaChainProducer,
|
||||
ThawHeight: backup.LeaseExpiry,
|
||||
},
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user