Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 3,508 Lines • ▼ Show 20 Lines | if (IsAvalancheMessageType(msg_type)) { | ||||
if (!g_avalanche) { | if (!g_avalanche) { | ||||
LogPrint(BCLog::AVALANCHE, | LogPrint(BCLog::AVALANCHE, | ||||
"Avalanche is not initialized, ignoring %s message\n", | "Avalanche is not initialized, ignoring %s message\n", | ||||
msg_type); | msg_type); | ||||
return; | return; | ||||
} | } | ||||
if (!isAvalancheEnabled(gArgs)) { | if (!isAvalancheEnabled(gArgs)) { | ||||
Misbehaving(pfrom, 20, "unsolicited-" + msg_type); | // If avalanche is not enabled, ignore avalanche messages | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if (msg_type == NetMsgType::VERSION) { | if (msg_type == NetMsgType::VERSION) { | ||||
// Each connection can only send one version message | // Each connection can only send one version message | ||||
if (pfrom.nVersion != 0) { | if (pfrom.nVersion != 0) { | ||||
Misbehaving(pfrom, 1, "redundant version message"); | Misbehaving(pfrom, 1, "redundant version message"); | ||||
▲ Show 20 Lines • Show All 3,462 Lines • Show Last 20 Lines |