mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-17 18:40:09 +00:00
Move nTimeBestReceived updating into net processing code
This commit is contained in:
parent
d8670fb103
commit
f5b960be4e
@ -63,7 +63,7 @@ CCriticalSection cs_main;
|
|||||||
BlockMap mapBlockIndex;
|
BlockMap mapBlockIndex;
|
||||||
CChain chainActive;
|
CChain chainActive;
|
||||||
CBlockIndex *pindexBestHeader = NULL;
|
CBlockIndex *pindexBestHeader = NULL;
|
||||||
int64_t nTimeBestReceived = 0;
|
int64_t nTimeBestReceived = 0; // Used only to inform the wallet of when we last received a block
|
||||||
CWaitableCriticalSection csBestBlock;
|
CWaitableCriticalSection csBestBlock;
|
||||||
CConditionVariable cvBlockChange;
|
CConditionVariable cvBlockChange;
|
||||||
int nScriptCheckThreads = 0;
|
int nScriptCheckThreads = 0;
|
||||||
@ -2690,7 +2690,6 @@ void static UpdateTip(CBlockIndex *pindexNew, const CChainParams& chainParams) {
|
|||||||
chainActive.SetTip(pindexNew);
|
chainActive.SetTip(pindexNew);
|
||||||
|
|
||||||
// New best block
|
// New best block
|
||||||
nTimeBestReceived = GetTime();
|
|
||||||
mempool.AddTransactionsUpdated(1);
|
mempool.AddTransactionsUpdated(1);
|
||||||
|
|
||||||
cvBlockChange.notify_all();
|
cvBlockChange.notify_all();
|
||||||
@ -4736,6 +4735,8 @@ void PeerLogicValidation::UpdatedBlockTip(const CBlockIndex *pindexNew, const CB
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nTimeBestReceived = GetTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PeerLogicValidation::BlockChecked(const CBlock& block, const CValidationState& state) {
|
void PeerLogicValidation::BlockChecked(const CBlock& block, const CValidationState& state) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user