Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 957 Lines • ▼ Show 20 Lines | if (state->nMisbehavior >= banscore && | ||||
state->fShouldBan = true; | state->fShouldBan = true; | ||||
} else { | } else { | ||||
LogPrint(BCLog::NET, "%s: %s peer=%d (%d -> %d)%s\n", __func__, | LogPrint(BCLog::NET, "%s: %s peer=%d (%d -> %d)%s\n", __func__, | ||||
state->name, pnode, state->nMisbehavior - howmuch, | state->name, pnode, state->nMisbehavior - howmuch, | ||||
state->nMisbehavior, message_prefixed); | state->nMisbehavior, message_prefixed); | ||||
} | } | ||||
} | } | ||||
// overloaded variant of above to operate on CNode*s | |||||
static void Misbehaving(CNode *node, int howmuch, const std::string &message) | |||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main) { | |||||
Misbehaving(node->GetId(), howmuch, message); | |||||
} | |||||
////////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////////// | ||||
// | // | ||||
// blockchain -> download logic notification | // blockchain -> download logic notification | ||||
// | // | ||||
// To prevent fingerprinting attacks, only send blocks/headers outside of the | // To prevent fingerprinting attacks, only send blocks/headers outside of the | ||||
// active chain if they are no more than a month older (both in time, and in | // active chain if they are no more than a month older (both in time, and in | ||||
// best equivalent proof of work) than the best header chain we know about and | // best equivalent proof of work) than the best header chain we know about and | ||||
▲ Show 20 Lines • Show All 3,480 Lines • Show Last 20 Lines |