From 76ce7518e7e8c87df9848c7e488a5adec19768ca Mon Sep 17 00:00:00 2001 From: "crypro.zoidberg" Date: Tue, 30 Apr 2019 19:07:54 +0200 Subject: [PATCH] added proper backward capability to wallet --- src/wallet/wallet2.h | 13 ++++++++++--- tests/functional_tests/main.cpp | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index 19101ef0..14812f80 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -615,15 +615,22 @@ namespace tools a & m_transfers; a & m_multisig_transfers; a & m_key_images; - a & m_pending_key_images; - a & m_unconfirmed_txs; + + if(ver >= 144) //reset unconfirmed due to "coinbase relay bug" + a & m_unconfirmed_txs; + a & m_unconfirmed_multisig_transfers; - a & m_tx_keys; a & m_payments; a & m_transfer_history; a & m_unconfirmed_in_transfers; a & m_contracts; a & m_money_expirations; + if (ver >= 144) + { + a & m_pending_key_images; + a & m_tx_keys; + } + } bool is_transfer_ready_to_go(const transfer_details& td, uint64_t fake_outputs_count); diff --git a/tests/functional_tests/main.cpp b/tests/functional_tests/main.cpp index d53e5f6c..47222857 100644 --- a/tests/functional_tests/main.cpp +++ b/tests/functional_tests/main.cpp @@ -66,7 +66,7 @@ int main(int argc, char* argv[]) currency::get_block_reward(false, 500000, 589313, 10300000000000000, reward, 11030); //set up logging options - log_space::get_set_log_detalisation_level(true, LOG_LEVEL_0); + log_space::get_set_log_detalisation_level(true, LOG_LEVEL_1); log_space::log_singletone::add_logger(LOGGER_CONSOLE, NULL, NULL, LOG_LEVEL_2); log_space::log_singletone::add_logger(LOGGER_FILE, log_space::log_singletone::get_default_log_file().c_str(),