Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 3,930 Lines • ▼ Show 20 Lines | if (msg_type == NetMsgType::AVAHELLO) { | ||||
CPubKey pubkey; | CPubKey pubkey; | ||||
if (!delegation.verify(state, pubkey)) { | if (!delegation.verify(state, pubkey)) { | ||||
Misbehaving(pfrom, 100, "invalid-delegation"); | Misbehaving(pfrom, 100, "invalid-delegation"); | ||||
return; | return; | ||||
} | } | ||||
SchnorrSig sig; | SchnorrSig sig; | ||||
verifier >> sig; | verifier >> sig; | ||||
if (!pubkey.VerifySchnorr(g_avalanche->buildRemoteSighash(&pfrom), | |||||
sig)) { | |||||
Misbehaving(pfrom, 100, "invalid-avahello-signature"); | |||||
return; | |||||
} | |||||
return; | |||||
} | } | ||||
if (msg_type == NetMsgType::AVAPOLL) { | if (msg_type == NetMsgType::AVAPOLL) { | ||||
auto now = std::chrono::steady_clock::now(); | auto now = std::chrono::steady_clock::now(); | ||||
int64_t cooldown = | int64_t cooldown = | ||||
gArgs.GetArg("-avacooldown", AVALANCHE_DEFAULT_COOLDOWN); | gArgs.GetArg("-avacooldown", AVALANCHE_DEFAULT_COOLDOWN); | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 1,567 Lines • Show Last 20 Lines |