lnwallet: update CoopCloseBalance to allow a paying party
This preps us for an upcoming change to the rbf coop state machine where either party can pay for the channel fees. We also add a new test to make sure the new function adheres to some key properties.
This commit is contained in:
3 files changed
+268
-6
No files matched your search
@@ -8289,6 +8289,7 @@ func (lc *LightningChannel) CreateCloseProposal(proposedFee btcutil.Amount,
|
||||
lc.channelState.LocalCommitment.LocalBalance.ToSatoshis(),
|
||||
lc.channelState.LocalCommitment.RemoteBalance.ToSatoshis(),
|
||||
lc.channelState.LocalCommitment.CommitFee,
|
||||
fn.None[lntypes.ChannelParty](),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, nil, 0, err
|
||||
@@ -8402,6 +8403,7 @@ func (lc *LightningChannel) CompleteCooperativeClose(
|
||||
lc.channelState.LocalCommitment.LocalBalance.ToSatoshis(),
|
||||
lc.channelState.LocalCommitment.RemoteBalance.ToSatoshis(),
|
||||
lc.channelState.LocalCommitment.CommitFee,
|
||||
fn.None[lntypes.ChannelParty](),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, 0, err
|
||||
|
||||
Reference in new issue
Block a user