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

Function setup_peers

lightningd/peer_control.c:2111–2121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2109}
2110
2111void setup_peers(struct lightningd *ld)
2112{
2113 struct peer *p;
2114 /* Avoid thundering herd: after first five, delay by 1 second. */
2115 int delay = -5;
2116
2117 list_for_each(&ld->peers, p, list) {
2118 setup_peer(p, delay > 0 ? delay : 0);
2119 delay++;
2120 }
2121}
2122
2123/* Pull peers, channels and HTLCs from db, and wire them up. */
2124struct htlc_in_map *load_channels_from_wallet(struct lightningd *ld)

Callers 2

json_recoverchannelFunction · 0.70
mainFunction · 0.70

Calls 1

setup_peerFunction · 0.85

Tested by

no test coverage detected