Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 2,733 Lines • ▼ Show 20 Lines | if (IsAvalancheMessageType(msg_type)) { | ||||
msg_type); | msg_type); | ||||
return; | return; | ||||
} | } | ||||
if (!gArgs.GetBoolArg("-enableavalanche", AVALANCHE_DEFAULT_ENABLED)) { | if (!gArgs.GetBoolArg("-enableavalanche", AVALANCHE_DEFAULT_ENABLED)) { | ||||
Misbehaving(pfrom, 20, "unsolicited-" + msg_type); | Misbehaving(pfrom, 20, "unsolicited-" + msg_type); | ||||
return; | return; | ||||
} | } | ||||
// Ignore avalanche requests while importing | |||||
if ((msg_type == NetMsgType::AVAPOLL || | |||||
msg_type == NetMsgType::AVARESPONSE) && | |||||
(fImporting || fReindex)) { | |||||
LogPrint(BCLog::NET, "Ignoring %s message while importing\n", | |||||
msg_type); | |||||
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"); | ||||
return; | return; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 2,871 Lines • Show Last 20 Lines |