Changeset View
Changeset View
Standalone View
Standalone View
src/chain.h
Show First 20 Lines • Show All 347 Lines • ▼ Show 20 Lines | public: | ||||
void BuildSkip(); | void BuildSkip(); | ||||
//! Efficiently find an ancestor of this block. | //! Efficiently find an ancestor of this block. | ||||
CBlockIndex *GetAncestor(int height); | CBlockIndex *GetAncestor(int height); | ||||
const CBlockIndex *GetAncestor(int height) const; | const CBlockIndex *GetAncestor(int height) const; | ||||
}; | }; | ||||
arith_uint256 GetBlockProof(const CBlockIndex &block); | arith_uint256 GetBlockProof(const CBlockIndex &block); | ||||
/** Return the time it would take to redo the work difference between from and | |||||
/** | |||||
* 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 | * to, assuming the current hashrate corresponds to the difficulty at tip, in | ||||
* seconds. */ | * seconds. | ||||
*/ | |||||
int64_t GetBlockProofEquivalentTime(const CBlockIndex &to, | int64_t GetBlockProofEquivalentTime(const CBlockIndex &to, | ||||
const CBlockIndex &from, | const CBlockIndex &from, | ||||
const CBlockIndex &tip, | const CBlockIndex &tip, | ||||
const Consensus::Params &); | const Consensus::Params &); | ||||
/** Used to marshal pointers into hashes for db storage. */ | /** Used to marshal pointers into hashes for db storage. */ | ||||
class CDiskBlockIndex : public CBlockIndex { | class CDiskBlockIndex : public CBlockIndex { | ||||
public: | public: | ||||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |