Merge ibd-sync-speedups into dev
Parallel RandomX PoW pre-verify, adaptive dbcache, UTXO snapshot, P2P/TLS sync fixes.
This commit is contained in:
12
src/chain.h
12
src/chain.h
@@ -399,7 +399,16 @@ public:
|
||||
|
||||
//! (memory only) Sequential id assigned to distinguish order in which blocks are received.
|
||||
uint32_t nSequenceId;
|
||||
|
||||
|
||||
//! (memory only) Set true once this block's RandomX PoW has been verified by the parallel
|
||||
//! pre-verification pool, letting the inline check in CheckBlockHeader skip the recompute.
|
||||
//! Written by exactly one pre-verify worker (1:1 with the block) and read by the connect
|
||||
//! thread only AFTER the pool barrier (CCheckQueue::Wait provides the happens-before), so a
|
||||
//! plain bool is race-free here. NOT serialized — a pure optimization hint; the inline
|
||||
//! CheckRandomXSolution remains the consensus authority. (Plain bool, not std::atomic, so
|
||||
//! CBlockIndex stays copyable for CDiskBlockIndex's `CBlockIndex(*pindex)` construction.)
|
||||
bool fRandomXVerified;
|
||||
|
||||
void SetNull()
|
||||
{
|
||||
phashBlock = NULL;
|
||||
@@ -414,6 +423,7 @@ public:
|
||||
chainPower = CChainPower();
|
||||
nTx = 0;
|
||||
nChainTx = 0;
|
||||
fRandomXVerified = false;
|
||||
|
||||
// Shieldex Index chain stats
|
||||
nChainPayments = 0;
|
||||
|
||||
Reference in New Issue
Block a user