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

Function delete_peer

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

Source from the content-addressed store, hash-verified

112}
113
114static void delete_peer(struct peer *peer)
115{
116 assert(list_empty(&peer->channels));
117 assert(!peer->uncommitted_channel);
118 /* If it only ever existed because of uncommitted channel, it won't
119 * be in the database */
120 if (peer->dbid != 0)
121 wallet_peer_delete(peer->ld->wallet, peer->dbid);
122 tal_free(peer);
123}
124
125/* Last one out deletes peer. */
126void maybe_delete_peer(struct peer *peer)

Callers 1

maybe_delete_peerFunction · 0.85

Calls 2

tal_freeFunction · 0.85
wallet_peer_deleteFunction · 0.50

Tested by

no test coverage detected