Changeset View
Changeset View
Standalone View
Standalone View
src/seeder/bitcoin.cpp
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | PeerMessagingState CSeederNode::ProcessMessage(std::string strCommand, | ||||
if (strCommand == NetMsgType::VERACK) { | if (strCommand == NetMsgType::VERACK) { | ||||
vRecv.SetVersion(std::min(nVersion, PROTOCOL_VERSION)); | vRecv.SetVersion(std::min(nVersion, PROTOCOL_VERSION)); | ||||
// tfm::format(std::cout, "\n%s: version %i\n", ToString(you), | // tfm::format(std::cout, "\n%s: version %i\n", ToString(you), | ||||
// nVersion); | // nVersion); | ||||
if (vAddr) { | if (vAddr) { | ||||
vSend += | vSend += | ||||
WriteMessage(vSend.GetVersion(), NetMsgType::GETADDR, netMagic); | WriteMessage(vSend.GetVersion(), NetMsgType::GETADDR, netMagic); | ||||
std::vector<BlockHash> locatorHash( | |||||
1, Params().Checkpoints().mapCheckpoints.rbegin()->second); | |||||
vSend += WriteMessage(vSend.GetVersion(), NetMsgType::GETHEADERS, | |||||
netMagic, locatorHash); | |||||
doneAfter = time(nullptr) + GetTimeout(); | doneAfter = time(nullptr) + GetTimeout(); | ||||
} else { | } else { | ||||
doneAfter = time(nullptr) + 1; | doneAfter = time(nullptr) + 1; | ||||
} | } | ||||
return PeerMessagingState::AwaitingMessages; | return PeerMessagingState::AwaitingMessages; | ||||
} | } | ||||
if (strCommand == NetMsgType::ADDR && vAddr) { | if (strCommand == NetMsgType::ADDR && vAddr) { | ||||
▲ Show 20 Lines • Show All 208 Lines • Show Last 20 Lines |