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

Function KeepOutgoingPeer

src/utilprocessmsg.cpp:25–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23} // ns anon
24
25bool KeepOutgoingPeer(const CNode& node) {
26 assert(!node.fInbound);
27
28 // Thin blocks enabled. We want thin block peers only.
29 if (Opt().UsingThinBlocks() && !SupportsThinBlocks(node))
30 return false;
31
32 // When we're on the UAHF fork, we want UAHF peers only.
33 // When we're not, we don't want UAHF peers.
34 return Opt().UAHFTime()
35 ? SignalsUAHF(node)
36 : !SignalsUAHF(node);
37}
38
39void UpdateBestHeaderSent(CNode& node, CBlockIndex* blockIndex) {
40 // When we send a block, were also sending its header.

Callers 2

ProcessMessageFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 5

OptClass · 0.85
SupportsThinBlocksFunction · 0.85
SignalsUAHFFunction · 0.85
UsingThinBlocksMethod · 0.80
UAHFTimeMethod · 0.80

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68