Changeset View
Changeset View
Standalone View
Standalone View
src/chain.h
Show First 20 Lines • Show All 256 Lines • ▼ Show 20 Lines | int64_t GetBlockProofEquivalentTime(const CBlockIndex &to, | ||||
const CBlockIndex &tip, | const CBlockIndex &tip, | ||||
const Consensus::Params &); | const Consensus::Params &); | ||||
/** | /** | ||||
* Find the forking point between two chain tips. | * Find the forking point between two chain tips. | ||||
*/ | */ | ||||
const CBlockIndex *LastCommonAncestor(const CBlockIndex *pa, | const CBlockIndex *LastCommonAncestor(const CBlockIndex *pa, | ||||
const CBlockIndex *pb); | const CBlockIndex *pb); | ||||
/** | |||||
* Check if two block index are on the same fork. | |||||
*/ | |||||
bool AreOnTheSameFork(const CBlockIndex *pa, const CBlockIndex *pb); | |||||
/** 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: | ||||
uint256 hashPrev; | uint256 hashPrev; | ||||
CDiskBlockIndex() { hashPrev = uint256(); } | CDiskBlockIndex() { hashPrev = uint256(); } | ||||
explicit CDiskBlockIndex(const CBlockIndex *pindex) : CBlockIndex(*pindex) { | explicit CDiskBlockIndex(const CBlockIndex *pindex) : CBlockIndex(*pindex) { | ||||
▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines |