multi: refactor select methods within channeldb to use ChannelParty

Also in this commit is a small adjustment to the call-sites to get
the boundaries stitched back together.
This commit is contained in:
Keagan McClelland committed 2024-07-31 14:50:26 -07:00
1 parent 3a15085014
commit 33934449ac
7 files changed
+58 -21

No files matched your search

+12 -2
View File
@@ -8460,7 +8460,12 @@ func (lc *LightningChannel) MarkCommitmentBroadcasted(tx *wire.MsgTx,
lc.Lock()
defer lc.Unlock()
return lc.channelState.MarkCommitmentBroadcasted(tx, locallyInitiated)
party := lntypes.Remote
if locallyInitiated {
party = lntypes.Local
}
return lc.channelState.MarkCommitmentBroadcasted(tx, party)
}
// MarkCoopBroadcasted marks the channel as a cooperative close transaction has
@@ -8473,7 +8478,12 @@ func (lc *LightningChannel) MarkCoopBroadcasted(tx *wire.MsgTx,
lc.Lock()
defer lc.Unlock()
return lc.channelState.MarkCoopBroadcasted(tx, localInitiated)
party := lntypes.Remote
if localInitiated {
party = lntypes.Local
}
return lc.channelState.MarkCoopBroadcasted(tx, party)
}
// MarkShutdownSent persists the given ShutdownInfo. The existence of the