Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/test/processor_tests.cpp
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | struct AvalancheTestingSetup : public TestChain100Setup { | ||||
AvalancheTestingSetup() | AvalancheTestingSetup() | ||||
: TestChain100Setup(), config(GetConfig()), masterpriv() { | : TestChain100Setup(), config(GetConfig()), masterpriv() { | ||||
// Deterministic randomness for tests. | // Deterministic randomness for tests. | ||||
auto connman = std::make_unique<CConnmanTest>(config, 0x1337, 0x1337); | auto connman = std::make_unique<CConnmanTest>(config, 0x1337, 0x1337); | ||||
m_connman = connman.get(); | m_connman = connman.get(); | ||||
m_node.connman = std::move(connman); | m_node.connman = std::move(connman); | ||||
m_node.peer_logic = std::make_unique<PeerLogicValidation>( | m_node.peer_logic = std::make_unique<PeerLogicValidation>( | ||||
m_connman, m_node.banman.get(), *m_node.scheduler, | m_connman, m_node.banman.get(), *m_node.scheduler, *m_node.chainman, | ||||
*m_node.chainman); | *m_node.mempool); | ||||
m_node.chain = interfaces::MakeChain(m_node, config.GetChainParams()); | m_node.chain = interfaces::MakeChain(m_node, config.GetChainParams()); | ||||
// Get the processor ready. | // Get the processor ready. | ||||
m_processor = | m_processor = | ||||
std::make_unique<Processor>(*m_node.chain, m_node.connman.get()); | std::make_unique<Processor>(*m_node.chain, m_node.connman.get()); | ||||
// The master private key we delegate to. | // The master private key we delegate to. | ||||
masterpriv.MakeNewKey(true); | masterpriv.MakeNewKey(true); | ||||
▲ Show 20 Lines • Show All 877 Lines • Show Last 20 Lines |