MCPcopy Create free account
hub / github.com/ElementsProject/elements / BlockConnected

Method BlockConnected

src/validation.cpp:2877–2884  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2875 explicit ConnectTrace() : blocksConnected(1) {}
2876
2877 void BlockConnected(CBlockIndex* pindex, std::shared_ptr<const CBlock> pblock) {
2878 assert(!blocksConnected.back().pindex);
2879 assert(pindex);
2880 assert(pblock);
2881 blocksConnected.back().pindex = pindex;
2882 blocksConnected.back().pblock = std::move(pblock);
2883 blocksConnected.emplace_back();
2884 }
2885
2886 std::vector<PerBlockConnectTrace>& GetBlocksConnected() {
2887 // We always keep one extra block at the end of our list because

Callers 2

ConnectTipMethod · 0.45
ActivateBestChainMethod · 0.45

Calls 1

emplace_backMethod · 0.80

Tested by

no test coverage detected