#include <consensus/merkle.h>
#include <test/util/random.h>
#include <test/util/setup_common.h>
#include <boost/test/unit_test.hpp>
Go to the source code of this file.
|
| static uint256 | ComputeMerkleRootFromBranch (const uint256 &leaf, const std::vector< uint256 > &vMerkleBranch, uint32_t nIndex) |
| |
| static void | MerkleComputation (const std::vector< uint256 > &leaves, uint256 *proot, bool *pmutated, uint32_t branchpos, std::vector< uint256 > *pbranch) |
| |
| static std::vector< uint256 > | ComputeMerkleBranch (const std::vector< uint256 > &leaves, uint32_t position) |
| |
| static std::vector< uint256 > | BlockMerkleBranch (const CBlock &block, uint32_t position) |
| |
| static uint256 | BlockBuildMerkleTree (const CBlock &block, bool *fMutated, std::vector< uint256 > &vMerkleTree) |
| |
| static std::vector< uint256 > | BlockGetMerkleBranch (const CBlock &block, const std::vector< uint256 > &vMerkleTree, int nIndex) |
| |
| static int | ctz (uint32_t i) |
| |
| | BOOST_AUTO_TEST_CASE (merkle_test) |
| |
| | BOOST_AUTO_TEST_CASE (merkle_test_empty_block) |
| |
| | BOOST_AUTO_TEST_CASE (merkle_test_oneTx_block) |
| |
| | BOOST_AUTO_TEST_CASE (merkle_test_OddTxWithRepeatedLastTx_block) |
| |
| | BOOST_AUTO_TEST_CASE (merkle_test_LeftSubtreeRightSubtree) |
| |
| | BOOST_AUTO_TEST_CASE (merkle_test_BlockWitness) |
| |
◆ BlockBuildMerkleTree()
| static uint256 BlockBuildMerkleTree |
( |
const CBlock & | block, |
|
|
bool * | fMutated, |
|
|
std::vector< uint256 > & | vMerkleTree ) |
|
static |
◆ BlockGetMerkleBranch()
| static std::vector< uint256 > BlockGetMerkleBranch |
( |
const CBlock & | block, |
|
|
const std::vector< uint256 > & | vMerkleTree, |
|
|
int | nIndex ) |
|
static |
◆ BlockMerkleBranch()
| static std::vector< uint256 > BlockMerkleBranch |
( |
const CBlock & | block, |
|
|
uint32_t | position ) |
|
static |
◆ BOOST_AUTO_TEST_CASE() [1/6]
| BOOST_AUTO_TEST_CASE |
( |
merkle_test | | ) |
|
◆ BOOST_AUTO_TEST_CASE() [2/6]
| BOOST_AUTO_TEST_CASE |
( |
merkle_test_BlockWitness | | ) |
|
◆ BOOST_AUTO_TEST_CASE() [3/6]
| BOOST_AUTO_TEST_CASE |
( |
merkle_test_empty_block | | ) |
|
◆ BOOST_AUTO_TEST_CASE() [4/6]
| BOOST_AUTO_TEST_CASE |
( |
merkle_test_LeftSubtreeRightSubtree | | ) |
|
◆ BOOST_AUTO_TEST_CASE() [5/6]
| BOOST_AUTO_TEST_CASE |
( |
merkle_test_OddTxWithRepeatedLastTx_block | | ) |
|
◆ BOOST_AUTO_TEST_CASE() [6/6]
| BOOST_AUTO_TEST_CASE |
( |
merkle_test_oneTx_block | | ) |
|
◆ ComputeMerkleBranch()
| static std::vector< uint256 > ComputeMerkleBranch |
( |
const std::vector< uint256 > & | leaves, |
|
|
uint32_t | position ) |
|
static |
◆ ComputeMerkleRootFromBranch()
| static uint256 ComputeMerkleRootFromBranch |
( |
const uint256 & | leaf, |
|
|
const std::vector< uint256 > & | vMerkleBranch, |
|
|
uint32_t | nIndex ) |
|
static |
◆ ctz()
| static int ctz |
( |
uint32_t | i | ) |
|
|
inlinestatic |
◆ MerkleComputation()
| static void MerkleComputation |
( |
const std::vector< uint256 > & | leaves, |
|
|
uint256 * | proot, |
|
|
bool * | pmutated, |
|
|
uint32_t | branchpos, |
|
|
std::vector< uint256 > * | pbranch ) |
|
static |