MCPcopy Create free account
hub / github.com/ElementsProject/lightning / gossip_store_delete

Function gossip_store_delete

gossipd/gossip_store.c:625–643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

623}
624
625void 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
645void gossip_store_mark_channel_deleted(struct gossip_store *gs,
646 const struct short_channel_id *scid)

Callers 6

remove_chan_from_nodeFunction · 0.70
routing_expire_channelsFunction · 0.70

Calls 1

delete_by_indexFunction · 0.85

Tested by

no test coverage detected