From ad77ef54f50e67596f232915878fdb9f07930652 Mon Sep 17 00:00:00 2001 From: "crypro.zoidberg" Date: Wed, 20 Feb 2019 20:04:11 +0100 Subject: [PATCH] attempt to fix #13 --- tests/core_tests/chain_switch_1.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/core_tests/chain_switch_1.cpp b/tests/core_tests/chain_switch_1.cpp index 512e23cf..d4a0f403 100644 --- a/tests/core_tests/chain_switch_1.cpp +++ b/tests/core_tests/chain_switch_1.cpp @@ -313,11 +313,8 @@ bool bad_chain_switching_with_rollback::c1(currency::core& c, size_t ev_index, c } //----------------------------------------------------------------------------------------------------- - struct tx_in_pool_info { - tx_in_pool_info() {} - tx_in_pool_info(crypto::hash hash, size_t blobsize) : hash(hash), blobsize(blobsize) {} crypto::hash hash; size_t blobsize; }; @@ -325,8 +322,13 @@ struct tx_in_pool_info struct params_tx_pool { params_tx_pool() {} - params_tx_pool(crypto::hash hash, size_t blobsize) : txs({ tx_in_pool_info(hash, blobsize) }) {} - params_tx_pool(crypto::hash hash1, size_t blobsize1, crypto::hash hash2, size_t blobsize2) : txs({ tx_in_pool_info(hash1, blobsize1), tx_in_pool_info(hash2, blobsize2) }) {} + params_tx_pool(crypto::hash hash, size_t blobsize) : txs{ tx_in_pool_info{ hash, blobsize } } + {} + params_tx_pool(crypto::hash hash1, size_t blobsize1, crypto::hash hash2, size_t blobsize2) + { + txs.push_back(tx_in_pool_info{ hash1, blobsize1 }); + txs.push_back(tx_in_pool_info{ hash2, blobsize2 }); + } std::vector txs; BEGIN_KV_SERIALIZE_MAP()