mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 22:45:27 +01:00
gossipd: add assertions to try to catch mysterious crash.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
a80241ec7a
commit
9d721ecb99
1 changed files with 3 additions and 0 deletions
|
@ -1561,7 +1561,10 @@ static struct io_plan *peer_pkt_out(struct io_conn *conn, struct peer *peer)
|
||||||
/* First priority is queued packets, if any */
|
/* First priority is queued packets, if any */
|
||||||
const u8 *out;
|
const u8 *out;
|
||||||
|
|
||||||
|
assert(peer->local);
|
||||||
again:
|
again:
|
||||||
|
/* Second assert may trigger if something happens due to loop */
|
||||||
|
assert(peer->local);
|
||||||
out = msg_dequeue(&peer->local->peer_out);
|
out = msg_dequeue(&peer->local->peer_out);
|
||||||
if (out) {
|
if (out) {
|
||||||
if (is_all_channel_error(out))
|
if (is_all_channel_error(out))
|
||||||
|
|
Loading…
Add table
Reference in a new issue