Merge pull request #7115 from C-Otto/log
lnwallet: add log message for edge case
This commit is contained in:
2 files changed
+12
-1
No files matched your search
@@ -115,6 +115,9 @@ current gossip sync query status.
|
|||||||
* [Fix the issue of ghost UTXOs not being detected as spent if they were created
|
* [Fix the issue of ghost UTXOs not being detected as spent if they were created
|
||||||
with an external tool](https://github.com/lightningnetwork/lnd/pull/7243).
|
with an external tool](https://github.com/lightningnetwork/lnd/pull/7243).
|
||||||
|
|
||||||
|
* [Add log message for edge
|
||||||
|
case](https://github.com/lightningnetwork/lnd/pull/7115).
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
[The project has updated to Go
|
[The project has updated to Go
|
||||||
@@ -357,6 +360,7 @@ refactor the itest for code health and maintenance.
|
|||||||
* andreihod
|
* andreihod
|
||||||
* Antoni Spaanderman
|
* Antoni Spaanderman
|
||||||
* Carla Kirk-Cohen
|
* Carla Kirk-Cohen
|
||||||
|
* Carsten Otto
|
||||||
* Conner Babinchak
|
* Conner Babinchak
|
||||||
* cutiful
|
* cutiful
|
||||||
* Daniel McNally
|
* Daniel McNally
|
||||||
|
|||||||
+8
-1
@@ -7031,7 +7031,14 @@ func (lc *LightningChannel) availableCommitmentBalance(view *htlcView,
|
|||||||
// report our available balance just below the non-dust amount, to
|
// report our available balance just below the non-dust amount, to
|
||||||
// avoid attempting HTLCs larger than this size.
|
// avoid attempting HTLCs larger than this size.
|
||||||
if theirBalance < htlcCommitFee && ourBalance >= nonDustHtlcAmt {
|
if theirBalance < htlcCommitFee && ourBalance >= nonDustHtlcAmt {
|
||||||
ourBalance = nonDustHtlcAmt - 1
|
// see https://github.com/lightning/bolts/issues/728
|
||||||
|
ourReportedBalance := nonDustHtlcAmt - 1
|
||||||
|
lc.log.Infof("Reducing local balance (from %v to %v): "+
|
||||||
|
"remote side does not have enough funds (%v < %v) to "+
|
||||||
|
"pay for non-dust HTLC in case of unilateral close.",
|
||||||
|
ourBalance, ourReportedBalance, theirBalance,
|
||||||
|
htlcCommitFee)
|
||||||
|
ourBalance = ourReportedBalance
|
||||||
}
|
}
|
||||||
|
|
||||||
return ourBalance, commitWeight
|
return ourBalance, commitWeight
|
||||||
|
|||||||
Reference in new issue
Block a user