36 std::unique_ptr<PeerManager> peerman =
PeerManager::make(*m_node.connman, *m_node.addrman,
nullptr, *m_node.chainman, *m_node.mempool, *m_node.warnings, {});
37 auto consensus = m_node.chainman->GetParams().GetConsensus();
45 uint64_t tip_block_time = tip->GetBlockTime();
46 int tip_block_height = tip->nHeight;
47 peerman->SetBestBlock(tip_block_height, std::chrono::seconds{tip_block_time});
62 m_node.validation_signals->RegisterValidationInterface(peerman.get());
66 mineBlock(m_node, std::chrono::seconds{tip_block_time + 1});
static std::unique_ptr< PeerManager > make(CConnman &connman, AddrMan &addrman, BanMan *banman, ChainstateManager &chainman, CTxMemPool &pool, node::Warnings &warnings, Options opts)
RecursiveMutex cs_main
Mutex to guard access to validation specific variables, such as reading or changing the chainstate.
bool CheckProofOfWork(uint256 hash, unsigned int nBits, const Consensus::Params ¶ms)
Check whether a block hash satisfies the proof-of-work requirement specified by nBits.