mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 15:50:07 +01:00
fuzz: DisableNextWrite
This is required in the process_message(s) fuzz targets to avoid leaking the next write time from one run to the next. Also, disable it completely because it is not needed and due to leveldb-internal non-determinism.
This commit is contained in:
@@ -9,6 +9,15 @@
|
||||
#include <validation.h>
|
||||
#include <validationinterface.h>
|
||||
|
||||
void TestChainstateManager::DisableNextWrite()
|
||||
{
|
||||
struct TestChainstate : public Chainstate {
|
||||
void ResetNextWrite() { m_next_write = NodeClock::time_point::max() - 1s; }
|
||||
};
|
||||
for (auto* cs : GetAll()) {
|
||||
static_cast<TestChainstate*>(cs)->ResetNextWrite();
|
||||
}
|
||||
}
|
||||
void TestChainstateManager::ResetIbd()
|
||||
{
|
||||
m_cached_finished_ibd = false;
|
||||
|
||||
Reference in New Issue
Block a user