channeldb/channel: add property ChanStatus in place of IsBorked to OpenChannel
This commit changes the bool `IsBorked` in OpenChannel to a `ChanStatus` struct, of type ChannelStatus. This is used to indicated that a channel that is technically still open, is either borked, or has had a commitment broadcasted, but is not confirmed on-chain yet. The ChannelStatus type has the value 1 for the status Borked, meaning it is backwards compatible with the old database format.
This commit is contained in:
2 files changed
+71
-20
No files matched your search
+1
-1
@@ -4754,7 +4754,7 @@ func NewUnilateralCloseSummary(chanState *channeldb.OpenChannel, signer Signer,
|
||||
RemotePub: chanState.IdentityPub,
|
||||
Capacity: chanState.Capacity,
|
||||
SettledBalance: localBalance,
|
||||
CloseType: channeldb.ForceClose,
|
||||
CloseType: channeldb.RemoteForceClose,
|
||||
IsPending: true,
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user