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

Function init_topo

lightningd/chaintopology.c:837–852  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

835}
836
837static void init_topo(struct bitcoind *bitcoind UNUSED,
838 struct bitcoin_blkid *blkid UNUSED,
839 struct bitcoin_block *blk,
840 struct chain_topology *topo)
841{
842 topo->root = new_block(topo, blk, topo->max_blockheight);
843 block_map_add(&topo->block_map, topo->root);
844 topo->tip = topo->root;
845 topo->prev_tip = topo->tip->blkid;
846
847 /* In case we don't get all the way to updates_complete */
848 db_set_intvar(topo->bitcoind->ld->wallet->db,
849 "last_processed_block", topo->tip->height);
850
851 maybe_completed_init(topo);
852}
853
854u32 get_block_height(const struct chain_topology *topo)
855{

Callers

nothing calls this directly

Calls 3

new_blockFunction · 0.85
db_set_intvarFunction · 0.85
maybe_completed_initFunction · 0.85

Tested by

no test coverage detected