diff --git a/lightningd/gossip_control.c b/lightningd/gossip_control.c index 0043de9682df..d1bf0c0be18c 100644 --- a/lightningd/gossip_control.c +++ b/lightningd/gossip_control.c @@ -102,6 +102,10 @@ static void get_txout(struct subd *gossip, const u8 *msg) subd_send_msg(gossip, take(towire_gossipd_get_txout_reply( NULL, scid, AMOUNT_SAT(0), NULL))); } else { + /* If we're shutting down, don't ask plugins */ + if (gossip->ld->state == LD_STATE_SHUTDOWN) + return; + /* Make a pointer of a copy of scid here, for got_filteredblock */ bitcoind_getfilteredblock(topo->bitcoind, topo->bitcoind, short_channel_id_blocknum(scid),