aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/util/mempool.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/fuzz/util/mempool.h')
-rw-r--r--src/test/fuzz/util/mempool.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/fuzz/util/mempool.h b/src/test/fuzz/util/mempool.h
new file mode 100644
index 0000000000..31b578dc4b
--- /dev/null
+++ b/src/test/fuzz/util/mempool.h
@@ -0,0 +1,26 @@
+// Copyright (c) 2022 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_TEST_FUZZ_UTIL_MEMPOOL_H
+#define BITCOIN_TEST_FUZZ_UTIL_MEMPOOL_H
+
+#include <kernel/mempool_entry.h>
+#include <validation.h>
+
+class CTransaction;
+class CTxMemPool;
+class FuzzedDataProvider;
+
+class DummyChainState final : public Chainstate
+{
+public:
+ void SetMempool(CTxMemPool* mempool)
+ {
+ m_mempool = mempool;
+ }
+};
+
+[[nodiscard]] CTxMemPoolEntry ConsumeTxMemPoolEntry(FuzzedDataProvider& fuzzed_data_provider, const CTransaction& tx) noexcept;
+
+#endif // BITCOIN_TEST_FUZZ_UTIL_MEMPOOL_H