![]() |
Bitcoin Core 31.1.0
P2P Digital Currency
|
Go to the source code of this file.
Functions | |
| std::vector< uint256 > | LocatorEntries (const CBlockIndex *index) |
| Construct a list of hash entries to put in a locator. | |
| CBlockLocator | GetLocator (const CBlockIndex *index) |
| Get a locator for a block index entry. | |
| static int | InvertLowestOne (int n) |
| Turn the lowest '1' bit in the binary representation of a number into a '0'. | |
| static int | GetSkipHeight (int height) |
| Compute what height to jump back to with the CBlockIndex::pskip pointer. | |
| arith_uint256 | GetBitsProof (uint32_t bits) |
| Compute how much work an nBits value corresponds to. | |
| int64_t | GetBlockProofEquivalentTime (const CBlockIndex &to, const CBlockIndex &from, const CBlockIndex &tip, const Consensus::Params ¶ms) |
| 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. | |
| const CBlockIndex * | LastCommonAncestor (const CBlockIndex *pa, const CBlockIndex *pb) |
| Find the last common ancestor two blocks have. | |
| arith_uint256 GetBitsProof | ( | uint32_t | bits | ) |
| int64_t GetBlockProofEquivalentTime | ( | const CBlockIndex & | to, |
| const CBlockIndex & | from, | ||
| const CBlockIndex & | tip, | ||
| const Consensus::Params & | params ) |
| CBlockLocator GetLocator | ( | const CBlockIndex * | index | ) |
|
inlinestatic |
Compute what height to jump back to with the CBlockIndex::pskip pointer.
Definition at line 73 of file chain.cpp.
|
inlinestatic |
| const CBlockIndex * LastCommonAncestor | ( | const CBlockIndex * | pa, |
| const CBlockIndex * | pb ) |
Find the last common ancestor two blocks have.
Find the forking point between two chain tips.
Both pa and pb must be non-nullptr.
Find the last common ancestor two blocks have.
Definition at line 155 of file chain.cpp.
| std::vector< uint256 > LocatorEntries | ( | const CBlockIndex * | index | ) |