mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-01 16:53:52 +02:00
Merge bitcoin/bitcoin#31197: refactor: mining interface 30955 followups
f86678156aCheck leaves size maximum in MerkleComputation (Sjors Provoost)4d57288246refactor: use CTransactionRef in submitSolution (Sjors Provoost)2e81791d90Drop TransactionMerklePath default position arg (Sjors Provoost)39d3b538e6Rename merkle branch to path (Sjors Provoost) Pull request description: This PR implements the refactors suggested in https://github.com/bitcoin/bitcoin/pull/30955#pullrequestreview-2354931253. ACKs for top commit: tdb3: code review re-ACKf86678156aitornaza: re ACKf86678156aryanofsky: Code review ACKf86678156aonly changes since last review are a whitespace change and adding an Assume statement to check for size_t -> uint32_t overflows Tree-SHA512: 661b5d5d0e24b2269bf33ab1484e37c36e67b32a7796d77ca3b1856d3043378b081ad43c32a8638b46fa8c0de51c823fd9747dd9fc81f958f20d327bf330a47c
This commit is contained in:
@@ -135,7 +135,7 @@ BOOST_AUTO_TEST_CASE(merkle_test)
|
||||
if (ntx > 16) {
|
||||
mtx = m_rng.randrange(ntx);
|
||||
}
|
||||
std::vector<uint256> newBranch = BlockMerkleBranch(block, mtx);
|
||||
std::vector<uint256> newBranch = TransactionMerklePath(block, mtx);
|
||||
std::vector<uint256> oldBranch = BlockGetMerkleBranch(block, merkleTree, mtx);
|
||||
BOOST_CHECK(oldBranch == newBranch);
|
||||
BOOST_CHECK(ComputeMerkleRootFromBranch(block.vtx[mtx]->GetHash(), newBranch, mtx) == oldRoot);
|
||||
|
||||
Reference in New Issue
Block a user