MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / UpdateBestHeaderSent

Function UpdateBestHeaderSent

src/utilprocessmsg.cpp:39–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39void UpdateBestHeaderSent(CNode& node, CBlockIndex* blockIndex) {
40 // When we send a block, were also sending its header.
41 NodeStatePtr state(node.id);
42 if (!state->bestHeaderSent)
43 state->bestHeaderSent = blockIndex;
44
45 if (state->bestHeaderSent->nHeight <= blockIndex->nHeight)
46 state->bestHeaderSent = blockIndex;
47}

Callers 3

sendMethod · 0.85
announceWithHeadersMethod · 0.85
announceWithBlockMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected