Bitcoin
|
#include <chain.h>
Functions | |
static int | InvertLowestOne (int n) |
static int | GetSkipHeight (int height) |
arith_uint256 | GetBlockProof (const CBlockIndex &block) |
int64_t | GetBlockProofEquivalentTime (const CBlockIndex &to, const CBlockIndex &from, const CBlockIndex &tip, const Consensus::Params ¶ms) |
const CBlockIndex * | LastCommonAncestor (const CBlockIndex *pa, const CBlockIndex *pb) |
arith_uint256 GetBlockProof | ( | const CBlockIndex & | block | ) |
int64_t GetBlockProofEquivalentTime | ( | const CBlockIndex & | to, |
const CBlockIndex & | from, | ||
const CBlockIndex & | tip, | ||
const Consensus::Params & | |||
) |
Return the time it would take to redo the work difference between from and to, assuming the current hashrate corresponds to the difficulty at tip, in seconds.
|
inlinestatic |
Compute what height to jump back to with the CBlockIndex::pskip pointer.
|
inlinestatic |
Turn the lowest '1' bit in the binary representation of a number into a '0'.
const CBlockIndex* LastCommonAncestor | ( | const CBlockIndex * | pa, |
const CBlockIndex * | pb | ||
) |
Find the last common ancestor two blocks have. Both pa and pb must be non-nullptr.