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

Function add_tip

lightningd/chaintopology.c:714–731  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

712}
713
714static void add_tip(struct chain_topology *topo, struct block *b)
715{
716 /* Attach to tip; b is now the tip. */
717 assert(b->height == topo->tip->height + 1);
718 b->prev = topo->tip;
719 topo->tip->next = b; /* FIXME this doesn't seem to be used anywhere */
720 topo->tip = b;
721 wallet_block_add(topo->ld->wallet, b);
722
723 topo_add_utxos(topo, b);
724 topo_update_spends(topo, b);
725
726 /* Only keep the transactions we care about. */
727 filter_block_txs(topo, b);
728
729 block_map_add(&topo->block_map, b);
730 topo->max_blockheight = b->height;
731}
732
733static struct block *new_block(struct chain_topology *topo,
734 struct bitcoin_block *blk,

Callers 1

get_new_blockFunction · 0.85

Calls 4

wallet_block_addFunction · 0.85
topo_add_utxosFunction · 0.85
topo_update_spendsFunction · 0.85
filter_block_txsFunction · 0.85

Tested by

no test coverage detected