From 2c46640dd043a1c98306472cc7cfbae193d22b8e Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Mon, 6 Jan 2020 11:42:02 +0100 Subject: [PATCH] channeldb+lnwallet: note that balance is after subtracting commit fee It was incorrectly stated that the commitment balance was before subctracting the commit fee, which led to some confusion. --- channeldb/channel.go | 4 ++++ lnwallet/channel.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/channeldb/channel.go b/channeldb/channel.go index 84e96c8e..edbe4279 100644 --- a/channeldb/channel.go +++ b/channeldb/channel.go @@ -320,10 +320,14 @@ type ChannelCommitment struct { // LocalBalance is the current available settled balance within the // channel directly spendable by us. + // + // NOTE: This is the balance *after* subtracting any commitment fee. LocalBalance lnwire.MilliSatoshi // RemoteBalance is the current available settled balance within the // channel directly spendable by the remote node. + // + // NOTE: This is the balance *after* subtracting any commitment fee. RemoteBalance lnwire.MilliSatoshi // CommitFee is the amount calculated to be paid in fees for the diff --git a/lnwallet/channel.go b/lnwallet/channel.go index 837f05cb..8f728283 100644 --- a/lnwallet/channel.go +++ b/lnwallet/channel.go @@ -502,7 +502,7 @@ type commitment struct { // evaluating all the add/remove/settle log entries before the listed // indexes. // - // NOTE: This is the balance *before* subtracting any commitment fee. + // NOTE: This is the balance *after* subtracting any commitment fee. ourBalance lnwire.MilliSatoshi theirBalance lnwire.MilliSatoshi