mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
gossip: don't use assert around code with side effects.
The use of status_failed() requires a stubs update, which fails with unnamed parameters, so tweak the status.h header as well. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
0db821e2cf
commit
047a2ea043
@@ -583,8 +583,12 @@ bool handle_channel_announcement(
|
||||
serialized);
|
||||
|
||||
if (forward) {
|
||||
assert(!queue_broadcast(rstate->broadcasts, WIRE_CHANNEL_ANNOUNCEMENT,
|
||||
(u8*)tag, serialized));
|
||||
if (queue_broadcast(rstate->broadcasts,
|
||||
WIRE_CHANNEL_ANNOUNCEMENT,
|
||||
(u8*)tag, serialized))
|
||||
status_failed(STATUS_FAIL_INTERNAL_ERROR,
|
||||
"Announcemnet %s was replaced?",
|
||||
tal_hex(trc, serialized));
|
||||
}
|
||||
|
||||
tal_free(tmpctx);
|
||||
|
||||
Reference in New Issue
Block a user