aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests/scaling_2021.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit_tests/scaling_2021.cpp')
-rw-r--r--tests/unit_tests/scaling_2021.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/unit_tests/scaling_2021.cpp b/tests/unit_tests/scaling_2021.cpp
index 024a4b4fd..d90f0f9e6 100644
--- a/tests/unit_tests/scaling_2021.cpp
+++ b/tests/unit_tests/scaling_2021.cpp
@@ -50,9 +50,6 @@ public:
}
#define PREFIX_WINDOW(hf_version,window) \
- std::unique_ptr<cryptonote::Blockchain> bc; \
- cryptonote::tx_memory_pool txpool(*bc); \
- bc.reset(new cryptonote::Blockchain(txpool)); \
struct get_test_options { \
const std::pair<uint8_t, uint64_t> hard_forks[3]; \
const cryptonote::test_options test_options = { \
@@ -61,7 +58,9 @@ public:
}; \
get_test_options(): hard_forks{std::make_pair(1, (uint64_t)0), std::make_pair((uint8_t)hf_version, (uint64_t)1), std::make_pair((uint8_t)0, (uint64_t)0)} {} \
} opts; \
- cryptonote::Blockchain *blockchain = bc.get(); \
+ cryptonote::BlockchainAndPool bap; \
+ cryptonote::Blockchain *blockchain = &bap.blockchain; \
+ cryptonote::Blockchain *bc = blockchain; \
bool r = blockchain->init(new TestDB(), cryptonote::FAKECHAIN, true, &opts.test_options, 0, NULL); \
ASSERT_TRUE(r)