peer: fix MarkCoopBroadcasted to correctly use local parameter

This commit is contained in:
Dario Anongba Varela committed 2026-02-02 12:16:29 +01:00
1 parent 8646d98469
commit 6e56c9a538
2 files changed
+12 -1

No files matched your search

@@ -51,6 +51,12 @@
DBytes33 (33 bytes) records, preventing malformed TLV data from being DBytes33 (33 bytes) records, preventing malformed TLV data from being
accepted. accepted.
- [Fixed `MarkCoopBroadcasted` to correctly use the `local`
parameter](https://github.com/lightningnetwork/lnd/pull/10532). The method was
ignoring the `local` parameter and always marking cooperative close
transactions as locally initiated, even when they were initiated by the remote
peer.
# New Features # New Features
- Basic Support for [onion messaging forwarding](https://github.com/lightningnetwork/lnd/pull/9868) - Basic Support for [onion messaging forwarding](https://github.com/lightningnetwork/lnd/pull/9868)
+6 -1
View File
@@ -119,7 +119,12 @@ func (l *chanObserver) DisableOutgoingAdds() error {
// MarkCoopBroadcasted persistently marks that the channel close transaction // MarkCoopBroadcasted persistently marks that the channel close transaction
// has been broadcast. // has been broadcast.
func (l *chanObserver) MarkCoopBroadcasted(tx *wire.MsgTx, local bool) error { func (l *chanObserver) MarkCoopBroadcasted(tx *wire.MsgTx, local bool) error {
return l.chanView.MarkCoopBroadcasted(tx, lntypes.Local) party := lntypes.Remote
if local {
party = lntypes.Local
}
return l.chanView.MarkCoopBroadcasted(tx, party)
} }
// MarkShutdownSent persists the given ShutdownInfo. The existence of the // MarkShutdownSent persists the given ShutdownInfo. The existence of the