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

Function delete_peer

lightningd/peer_control.c:130–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130static void delete_peer(struct peer *peer)
131{
132 assert(list_empty(&peer->channels));
133 assert(!peer->uncommitted_channel);
134 /* If it only ever existed because of uncommitted channel, it won't
135 * be in the database */
136 if (peer->dbid != 0)
137 wallet_delete_peer_if_unused(peer->ld->wallet, peer->dbid);
138 tal_free(peer);
139}
140
141/* Last one out deletes peer. */
142void 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