Dash Core  0.12.2.1
P2P Digital Currency
merkle.cpp File Reference
#include "merkle.h"
#include "hash.h"
#include "utilstrencodings.h"

Go to the source code of this file.

Functions

static void MerkleComputation (const std::vector< uint256 > &leaves, uint256 *proot, bool *pmutated, uint32_t branchpos, std::vector< uint256 > *pbranch)
 
uint256 ComputeMerkleRoot (const std::vector< uint256 > &leaves, bool *mutated)
 
std::vector< uint256ComputeMerkleBranch (const std::vector< uint256 > &leaves, uint32_t position)
 
uint256 ComputeMerkleRootFromBranch (const uint256 &leaf, const std::vector< uint256 > &vMerkleBranch, uint32_t nIndex)
 
uint256 BlockMerkleRoot (const CBlock &block, bool *mutated)
 
std::vector< uint256BlockMerkleBranch (const CBlock &block, uint32_t position)
 

Function Documentation

◆ BlockMerkleBranch()

std::vector<uint256> BlockMerkleBranch ( const CBlock block,
uint32_t  position 
)

Definition at line 164 of file merkle.cpp.

◆ BlockMerkleRoot()

uint256 BlockMerkleRoot ( const CBlock block,
bool *  mutated 
)

Definition at line 154 of file merkle.cpp.

Referenced by CheckBlock(), CreateGenesisBlock(), and IncrementExtraNonce().

◆ ComputeMerkleBranch()

std::vector<uint256> ComputeMerkleBranch ( const std::vector< uint256 > &  leaves,
uint32_t  position 
)

Definition at line 135 of file merkle.cpp.

Referenced by BlockMerkleBranch().

◆ ComputeMerkleRoot()

uint256 ComputeMerkleRoot ( const std::vector< uint256 > &  leaves,
bool *  mutated 
)

Definition at line 129 of file merkle.cpp.

Referenced by BlockMerkleRoot().

◆ ComputeMerkleRootFromBranch()

uint256 ComputeMerkleRootFromBranch ( const uint256 leaf,
const std::vector< uint256 > &  vMerkleBranch,
uint32_t  nIndex 
)

Definition at line 141 of file merkle.cpp.

◆ MerkleComputation()

static void MerkleComputation ( const std::vector< uint256 > &  leaves,
uint256 proot,
bool *  pmutated,
uint32_t  branchpos,
std::vector< uint256 > *  pbranch 
)
static

Definition at line 42 of file merkle.cpp.

Referenced by ComputeMerkleBranch(), and ComputeMerkleRoot().