gossipd: use in_txout_failures to do lookup in channel_announcement.

This correctly refreshes the txout entry against aging.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2019-11-06 12:46:09 +10:30
parent 40d34fed9e
commit abe7133bd5
1 changed files with 2 additions and 3 deletions

View File

@ -1721,9 +1721,8 @@ u8 *handle_channel_announcement(struct routing_state *rstate,
} }
/* If a prior txout lookup failed there is little point it trying /* If a prior txout lookup failed there is little point it trying
* again. Just drop the announcement and walk away whistling. Any non-0 * again. Just drop the announcement and walk away whistling. */
* result means this failed before. */ if (in_txout_failures(rstate, &pending->short_channel_id)) {
if (uintmap_get(&rstate->txout_failures, pending->short_channel_id.u64)) {
SUPERVERBOSE( SUPERVERBOSE(
"Ignoring channel_announcement of %s due to a prior txout " "Ignoring channel_announcement of %s due to a prior txout "
"query failure. The channel was likely closed on-chain.", "query failure. The channel was likely closed on-chain.",