Restore per-algo block index tracking

This commit is contained in:
Capri 2026-09-12 20:32:57 +00:00
commit 2210ac3451
Signed by: VextaProject
SSH key fingerprint: SHA256:739BZv8LvIDY2tR7lXLy/IQ6MaGTQtYcG9GNvCjmpVM
3 changed files with 40 additions and 5 deletions

View file

@ -201,6 +201,9 @@ public:
//! (memory only) Maximum nTime in the chain up to and including this block.
unsigned int nTimeMax{0};
//! (memory only) Most recent block index for each mining algorithm.
CBlockIndex* lastAlgoBlocks[NUM_ALGOS_IMPL]{};
/**
* Default constructor (no header):
*/
@ -264,6 +267,8 @@ public:
bool HaveTxsDownloaded() const { return nChainTx != 0; }
int GetAlgo() const;
int64_t GetBlockTime() const
{
return (int64_t)nTime;