 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
21 pindex = pindex->
pprev;
28 std::vector<uint256> vHave;
39 int nHeight = std::max(pindex->
nHeight - nStep, 0);
42 pindex = (*this)[nHeight];
47 if (vHave.size() > 10)
56 if (pindex ==
nullptr) {
62 pindex = pindex->
pprev;
79 return bnPoWTrust > 1 ? bnPoWTrust : 1;
const uint256 UINT256_ZERO
constant uint256 instances
bool IsProofOfStake() const
CBlockIndex * GetAncestor(int height)
Efficiently find an ancestor of this block.
CBlockIndex * pprev
pointer to the index of the predecessor of this block
int nHeight
height of the entry in the chain. The genesis block has height 0
uint256 & SetCompact(uint32_t nCompact, bool *pfNegative=nullptr, bool *pfOverflow=nullptr)
The "compact" format is a representation of a whole number N using an unsigned 32bit number similar t...
const CBlockIndex * FindFork(const CBlockIndex *pindex) const
Find the last common block between this chain and a block index entry.
const uint256 UINT256_ONE
256-bit unsigned big integer.
void SetTip(CBlockIndex *pindex)
Set/initialize a chain with a given tip.
uint256 GetBlockHash() const
int Height() const
Return the maximal height in the chain.
CBlockLocator GetLocator(const CBlockIndex *pindex=NULL) const
Return a CBlockLocator that refers to a block in this chain (by default the tip).
std::vector< CBlockIndex * > vChain
bool Contains(const CBlockIndex *pindex) const
Efficiently check whether a block is present in this chain.
CBlockIndex * Tip(bool fProofOfStake=false) const
Returns the index entry for the tip of this chain, or NULL if none.
Describes a place in the block chain to another node such that if the other node doesn't have the sam...
The block chain is a tree shaped structure starting with the genesis block at the root,...
uint256 GetBlockTrust() const