Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 2,265 Lines • ▼ Show 20 Lines | #endif | ||||
assert(!node.mempool); | assert(!node.mempool); | ||||
node.mempool = &::g_mempool; | node.mempool = &::g_mempool; | ||||
assert(!node.chainman); | assert(!node.chainman); | ||||
node.chainman = &g_chainman; | node.chainman = &g_chainman; | ||||
ChainstateManager &chainman = *Assert(node.chainman); | ChainstateManager &chainman = *Assert(node.chainman); | ||||
node.peer_logic.reset( | node.peer_logic.reset( | ||||
new PeerLogicValidation(*node.connman, node.banman.get(), | new PeerLogicValidation(chainparams, *node.connman, node.banman.get(), | ||||
*node.scheduler, chainman, *node.mempool)); | *node.scheduler, chainman, *node.mempool)); | ||||
RegisterValidationInterface(node.peer_logic.get()); | RegisterValidationInterface(node.peer_logic.get()); | ||||
// sanitize comments per BIP-0014, format user agent and check total size | // sanitize comments per BIP-0014, format user agent and check total size | ||||
std::vector<std::string> uacomments; | std::vector<std::string> uacomments; | ||||
for (const std::string &cmt : args.GetArgs("-uacomment")) { | for (const std::string &cmt : args.GetArgs("-uacomment")) { | ||||
if (cmt != SanitizeString(cmt, SAFE_CHARS_UA_COMMENT)) { | if (cmt != SanitizeString(cmt, SAFE_CHARS_UA_COMMENT)) { | ||||
return InitError(strprintf( | return InitError(strprintf( | ||||
▲ Show 20 Lines • Show All 675 Lines • Show Last 20 Lines |