mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 18:10:34 +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
@ -174,7 +174,7 @@ func NewChannelReservation(capacity, fundingAmt btcutil.Amount, minFeeRate btcut
|
|||||||
// transaction. We also deduct our balance by the
|
// transaction. We also deduct our balance by the
|
||||||
// amount pushed as part of the initial state.
|
// amount pushed as part of the initial state.
|
||||||
ourBalance = capacity - commitFee - pushSat
|
ourBalance = capacity - commitFee - pushSat
|
||||||
theirBalance = capacity - fundingAmt + pushSat
|
theirBalance = pushSat
|
||||||
} else {
|
} else {
|
||||||
// Otherwise, this is a dual funder workflow where both
|
// Otherwise, this is a dual funder workflow where both
|
||||||
// slides split the amount funded and the commitment
|
// slides split the amount funded and the commitment
|
||||||
|
Loading…
Reference in New Issue
Block a user