Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/test/processor_tests.cpp
Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | Proof GetProof() { | ||||
ProofBuilder pb(0, 0, masterpriv.GetPubKey()); | ProofBuilder pb(0, 0, masterpriv.GetPubKey()); | ||||
BOOST_CHECK(pb.addUTXO(COutPoint(coinbase.GetId(), 0), | BOOST_CHECK(pb.addUTXO(COutPoint(coinbase.GetId(), 0), | ||||
coinbase.vout[0].nValue, current_coinbase + 1, | coinbase.vout[0].nValue, current_coinbase + 1, | ||||
true, coinbaseKey)); | true, coinbaseKey)); | ||||
return pb.build(); | return pb.build(); | ||||
} | } | ||||
bool addNode(NodeId nodeid) { | bool addNode(NodeId nodeid) { | ||||
Proof proof = GetProof(); | Proof proof = GetProof(); | ||||
deadalnix: It's been several instance of GetProof that lead to a make_shared, this is indicative of a… | |||||
return m_processor->addNode(nodeid, proof, | const Delegation &dg = DelegationBuilder(proof).build(); | ||||
deadalnixUnsubmitted Not Done Inline Actionsdito deadalnix: dito | |||||
DelegationBuilder(proof).build()); | return m_processor->addNode( | ||||
nodeid, std::make_shared<Proof>(std::move(proof)), dg); | |||||
} | } | ||||
std::array<CNode *, 8> ConnectNodes() { | std::array<CNode *, 8> ConnectNodes() { | ||||
avalanche::PeerManager &pm = getPeerManager(); | avalanche::PeerManager &pm = getPeerManager(); | ||||
Proof proof = GetProof(); | Proof proof = GetProof(); | ||||
Delegation dg = DelegationBuilder(proof).build(); | Delegation dg = DelegationBuilder(proof).build(); | ||||
std::array<CNode *, 8> nodes; | std::array<CNode *, 8> nodes; | ||||
▲ Show 20 Lines • Show All 837 Lines • Show Last 20 Lines |
It's been several instance of GetProof that lead to a make_shared, this is indicative of a problem.