Merge bitcoin/bitcoin#22268: fuzz: Add temporary debug assert for oss-fuzz issue

faf1af58f8 fuzz: Add Temporary debug assert for oss-fuzz issue (MarcoFalke)

Pull request description:

  oss-fuzz is acting weird, so add an earlier assert to help troubleshooting

ACKs for top commit:
  practicalswift:
    cr ACK faf1af58f8

Tree-SHA512: 85830d7d47cf6b4edfe91a07bd5aa8f7110db0bade8df93868cf276ed04d5dd17e671f769e6a0fb5092012b86aa82bb411fb171411f15746981104ce634c88c1
This commit is contained in:
MarcoFalke 2021-06-17 14:57:07 +02:00
commit 922abe8ca3
No known key found for this signature in database
GPG key ID: CE2B75697E69A548

View file

@ -58,7 +58,19 @@ void initialize_process_message()
static const auto testing_setup = MakeNoLogFileContext<const TestingSetup>();
g_setup = testing_setup.get();
// Temporary debug for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35027
{
LOCK(::cs_main);
assert(CheckDiskSpace(gArgs.GetDataDirNet()));
assert(CheckDiskSpace(gArgs.GetDataDirNet(), 48 * 2 * 2 * g_setup->m_node.chainman->ActiveChainstate().CoinsTip().GetCacheSize()));
}
for (int i = 0; i < 2 * COINBASE_MATURITY; i++) {
{
LOCK(::cs_main);
assert(CheckDiskSpace(gArgs.GetDataDirNet()));
assert(CheckDiskSpace(gArgs.GetDataDirNet(), 48 * 2 * 2 * g_setup->m_node.chainman->ActiveChainstate().CoinsTip().GetCacheSize()));
}
MineBlock(g_setup->m_node, CScript() << OP_TRUE);
}
SyncWithValidationInterfaceQueue();