mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
routing: handle pending replies which are missing.
I'm not completely conviced that we can't end up removing pending things, so change asserts to simple returns. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
60e20b502e
commit
04eb101aa6
@ -768,11 +768,15 @@ bool handle_pending_cannouncement(struct routing_state *rstate,
|
||||
struct routing_channel *chan;
|
||||
u64 uscid = short_channel_id_to_uint(scid);
|
||||
|
||||
/* There may be paths which can clean this up, eg. error processing. */
|
||||
chan = uintmap_get(&rstate->channels, uscid);
|
||||
assert(chan);
|
||||
if (!chan)
|
||||
return false;
|
||||
|
||||
pending = chan->pending;
|
||||
assert(pending);
|
||||
/* We could imagine this being cleaned up, then recreated. */
|
||||
if (!pending)
|
||||
return false;
|
||||
chan->pending = NULL;
|
||||
|
||||
tag = tal_arr(pending, u8, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user