aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests/long_term_block_weight.cpp
diff options
context:
space:
mode:
authorjeffro256 <jeffro256@tutanota.com>2023-06-30 14:52:43 -0500
committerjeffro256 <jeffro256@tutanota.com>2023-07-01 07:12:53 -0500
commitffbf9f4766945f33b80366c414a5721ce90e5a2e (patch)
treead1a816d0dde18062afaad3357e88ef0d062375a /tests/unit_tests/long_term_block_weight.cpp
parentAvoid nullptr dereference when constructing Blockchain and tx_memory_pool (diff)
downloadmonero-ffbf9f4766945f33b80366c414a5721ce90e5a2e.tar.xz
blockchain_and_pool: move to crytonote_core and enforce its usage
Diffstat (limited to '')
-rw-r--r--tests/unit_tests/long_term_block_weight.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/unit_tests/long_term_block_weight.cpp b/tests/unit_tests/long_term_block_weight.cpp
index b9ce2b247..e52bd1955 100644
--- a/tests/unit_tests/long_term_block_weight.cpp
+++ b/tests/unit_tests/long_term_block_weight.cpp
@@ -106,16 +106,9 @@ static uint32_t lcg()
}
-struct BlockchainAndPool
-{
- cryptonote::tx_memory_pool txpool;
- cryptonote::Blockchain bc;
- BlockchainAndPool(): txpool(bc), bc(txpool) {}
-};
-
#define PREFIX_WINDOW(hf_version,window) \
- BlockchainAndPool bap; \
- cryptonote::Blockchain *bc = &bap.bc; \
+ cryptonote::BlockchainAndPool bap; \
+ cryptonote::Blockchain *bc = &bap.blockchain; \
struct get_test_options { \
const std::pair<uint8_t, uint64_t> hard_forks[3]; \
const cryptonote::test_options test_options = { \