chanbackup: support backup restore of script enforced leased channels
This commit is contained in:
1 parent
974fc346cf
commit
0b0dd65c93
3 files changed
+58
-6
No files matched your search
@@ -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