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

Function delete_peer

lightningd/peer_control.c:123–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123static void delete_peer(struct peer *peer)
124{
125 assert(list_empty(&peer->channels));
126 assert(!peer->uncommitted_channel);
127 /* If it only ever existed because of uncommitted channel, it won't
128 * be in the database */
129 if (peer->dbid != 0)
130 wallet_delete_peer_if_unused(peer->ld->wallet, peer->dbid);
131 tal_free(peer);
132}
133
134/* Last one out deletes peer. */
135void maybe_delete_peer(struct peer *peer)

Callers 1

maybe_delete_peerFunction · 0.85

Calls 2

tal_freeFunction · 0.85

Tested by

no test coverage detected