From 815826caacba8a48856dbf00b72db9f02d6501ff Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Sun, 24 Sep 2017 20:13:02 -0700 Subject: [PATCH] lnwallet: remove public LocalAvailableBalance method from channel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit removes the current active LocalAvailableBalance method from the channel state machine itself. We still maintain the internal availableLocalBalance method locally as this is used to ensure that we don’t add an HTLC which puts our available balance below zero. --- lnwallet/channel.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lnwallet/channel.go b/lnwallet/channel.go index 0bf4dc536..dc8c26c88 100644 --- a/lnwallet/channel.go +++ b/lnwallet/channel.go @@ -2846,15 +2846,6 @@ func (lc *LightningChannel) RevokeCurrentCommitment() (*lnwire.RevokeAndAck, err return revocationMsg, nil } -// LocalAvailableBalance returns the amount of available money which might be -// proceed by this channel at the specific point of time. -func (lc *LightningChannel) LocalAvailableBalance() lnwire.MilliSatoshi { - lc.Lock() - defer lc.Unlock() - - return lc.availableLocalBalance -} - // ReceiveRevocation processes a revocation sent by the remote party for the // lowest unrevoked commitment within their commitment chain. We receive a // revocation either during the initial session negotiation wherein revocation