lnwallet+htlcswitch: remove the redundant param in OweCommitment

This commit removes the bool param found in OweCommitment, which we
only ever use `true`.
This commit is contained in:
yyforyongyu committed 2022-04-20 01:18:12 +08:00
1 parent fea97699ec
commit acde626ac9
2 files changed
+5 -5

No files matched your search

+3 -3
View File
@@ -3825,7 +3825,7 @@ func (lc *LightningChannel) ProcessChanSyncMsg(
// but died before the signature was sent. We re-transmit our
// revocation, but also initiate a state transition to re-sync
// them.
if lc.OweCommitment(true) {
if lc.OweCommitment() {
commitSig, htlcSigs, _, err := lc.SignNextCommitment()
switch {
@@ -4539,11 +4539,11 @@ func (lc *LightningChannel) IsChannelClean() bool {
// out a commitment signature because there are outstanding local updates and/or
// updates in the local commit tx that aren't reflected in the remote commit tx
// yet.
func (lc *LightningChannel) OweCommitment(local bool) bool {
func (lc *LightningChannel) OweCommitment() bool {
lc.RLock()
defer lc.RUnlock()
return lc.oweCommitment(local)
return lc.oweCommitment(true)
}
// oweCommitment is the internal version of OweCommitment. This function expects