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

Function Misbehaving

src/main.cpp:1755–1772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1753}
1754
1755void Misbehaving(NodeId pnode, int howmuch)
1756{
1757 if (howmuch == 0)
1758 return;
1759
1760 NodeStatePtr state(pnode);
1761 if (state.IsNull())
1762 return;
1763
1764 state->nMisbehavior += howmuch;
1765 int banscore = GetArg("-banscore", 100);
1766 if (state->nMisbehavior >= banscore && state->nMisbehavior - howmuch < banscore)
1767 {
1768 LogPrintf("%s: %s (%d -> %d) BAN THRESHOLD EXCEEDED\n", __func__, state->name, state->nMisbehavior-howmuch, state->nMisbehavior);
1769 state->fShouldBan = true;
1770 } else
1771 LogPrintf("%s: %s (%d -> %d)\n", __func__, state->name, state->nMisbehavior-howmuch, state->nMisbehavior);
1772}
1773
1774void static InvalidChainFound(CBlockIndex* pindexNew)
1775{

Callers 10

handleReRequestFailedFunction · 0.85
misbehaveMethod · 0.85
BOOST_FOREACHFunction · 0.85
InvalidBlockFoundFunction · 0.85
SanityCheckMessageFunction · 0.85
unexpectedThinErrorFunction · 0.85
ProcessMessageFunction · 0.85
acceptHeadersMethod · 0.85
requestConnectHeadersMethod · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 2

GetArgFunction · 0.85
IsNullMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68