mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
tests: Add fuzzing harness for ProcessMessage(...)
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <init.h>
|
||||
#include <miner.h>
|
||||
#include <net.h>
|
||||
#include <net_processing.h>
|
||||
#include <noui.h>
|
||||
#include <pow.h>
|
||||
#include <rpc/blockchain.h>
|
||||
@@ -62,7 +63,7 @@ std::ostream& operator<<(std::ostream& os, const uint256& num)
|
||||
}
|
||||
|
||||
BasicTestingSetup::BasicTestingSetup(const std::string& chainName)
|
||||
: m_path_root{fs::temp_directory_path() / "test_common_" PACKAGE_NAME / std::to_string(g_insecure_rand_ctx_temp_path.rand32())}
|
||||
: m_path_root{fs::temp_directory_path() / "test_common_" PACKAGE_NAME / g_insecure_rand_ctx_temp_path.rand256().ToString()}
|
||||
{
|
||||
fs::create_directories(m_path_root);
|
||||
gArgs.ForceSetArg("-datadir", m_path_root.string());
|
||||
@@ -136,6 +137,7 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha
|
||||
m_node.mempool->setSanityCheck(1.0);
|
||||
m_node.banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
|
||||
m_node.connman = MakeUnique<CConnman>(0x1337, 0x1337); // Deterministic randomness for tests.
|
||||
m_node.peer_logic = MakeUnique<PeerLogicValidation>(m_node.connman.get(), m_node.banman.get(), *m_node.scheduler);
|
||||
}
|
||||
|
||||
TestingSetup::~TestingSetup()
|
||||
|
||||
Reference in New Issue
Block a user