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

Function new_topology

lightningd/chaintopology.c:946–966  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

944}
945
946struct chain_topology *new_topology(struct lightningd *ld, struct log *log)
947{
948 struct chain_topology *topo = tal(ld, struct chain_topology);
949
950 topo->ld = ld;
951 block_map_init(&topo->block_map);
952 list_head_init(&topo->outgoing_txs);
953 txwatch_hash_init(&topo->txwatches);
954 txowatch_hash_init(&topo->txowatches);
955 topo->log = log;
956 memset(topo->feerate, 0, sizeof(topo->feerate));
957 topo->bitcoind = new_bitcoind(topo, ld, log);
958 topo->poll_seconds = 30;
959 topo->feerate_uninitialized = true;
960 topo->root = NULL;
961 topo->sync_waiters = tal(topo, struct list_head);
962 topo->stopping = false;
963 list_head_init(topo->sync_waiters);
964
965 return topo;
966}
967
968static void check_blockcount(struct chain_topology *topo, u32 blockcount)
969{

Callers 1

new_lightningdFunction · 0.70

Calls 2

list_head_initFunction · 0.85
new_bitcoindFunction · 0.70

Tested by

no test coverage detected