| 623 | } |
| 624 | |
| 625 | void gossip_store_delete(struct gossip_store *gs, |
| 626 | struct broadcastable *bcast, |
| 627 | int type) |
| 628 | { |
| 629 | u32 next_index; |
| 630 | |
| 631 | if (!bcast->index) |
| 632 | return; |
| 633 | |
| 634 | next_index = delete_by_index(gs, bcast->index, type); |
| 635 | |
| 636 | /* Reset index. */ |
| 637 | bcast->index = 0; |
| 638 | |
| 639 | /* For a channel_announcement, we need to delete amount too */ |
| 640 | if (type == WIRE_CHANNEL_ANNOUNCEMENT) |
| 641 | delete_by_index(gs, next_index, |
| 642 | WIRE_GOSSIP_STORE_CHANNEL_AMOUNT); |
| 643 | } |
| 644 | |
| 645 | void gossip_store_mark_channel_deleted(struct gossip_store *gs, |
| 646 | const struct short_channel_id *scid) |
no test coverage detected