mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 14:22:37 +01:00
lnwallet: simplify remote balance computation for single funder
The remote balance in the case of a single funder workflow is simply what ever the pushSat amount is. The capacity - fundingAmt in this scenario would always be zero, so we simply just set it directly to pushSat.
This commit is contained in:
parent
392f6b5d8a
commit
48850d31d6
1 changed files with 1 additions and 1 deletions
|
@ -174,7 +174,7 @@ func NewChannelReservation(capacity, fundingAmt btcutil.Amount, minFeeRate btcut
|
|||
// transaction. We also deduct our balance by the
|
||||
// amount pushed as part of the initial state.
|
||||
ourBalance = capacity - commitFee - pushSat
|
||||
theirBalance = capacity - fundingAmt + pushSat
|
||||
theirBalance = pushSat
|
||||
} else {
|
||||
// Otherwise, this is a dual funder workflow where both
|
||||
// slides split the amount funded and the commitment
|
||||
|
|
Loading…
Add table
Reference in a new issue