~ This is where lightningd tells us that a channel's funding transaction has * been spent. */
| 929 | /*~ This is where lightningd tells us that a channel's funding transaction has |
| 930 | * been spent. */ |
| 931 | static void handle_outpoints_spent(struct daemon *daemon, const u8 *msg) |
| 932 | { |
| 933 | struct short_channel_id *scids; |
| 934 | u32 blockheight; |
| 935 | |
| 936 | if (!fromwire_gossipd_outpoints_spent(msg, msg, &blockheight, &scids)) |
| 937 | master_badmsg(WIRE_GOSSIPD_OUTPOINTS_SPENT, msg); |
| 938 | |
| 939 | for (size_t i = 0; i < tal_count(scids); i++) { |
| 940 | struct chan *chan = get_channel(daemon->rstate, &scids[i]); |
| 941 | |
| 942 | if (!chan) |
| 943 | continue; |
| 944 | |
| 945 | /* We have a current_blockheight, but it's not necessarily |
| 946 | * updated first. */ |
| 947 | routing_channel_spent(daemon->rstate, blockheight, chan); |
| 948 | } |
| 949 | } |
| 950 | |
| 951 | /*~ This is sent by lightningd when it kicks off 'closingd': we disable it |
| 952 | * in both directions. |
no test coverage detected