From 986f7dc7d30fc64405110b8b03b7cdb267f90847 Mon Sep 17 00:00:00 2001 From: sowle Date: Thu, 10 Oct 2024 15:20:42 +0200 Subject: [PATCH] minor improvements --- src/wallet/wallet_errors.h | 7 +++++-- tests/core_tests/wallet_tests.cpp | 7 ++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/wallet/wallet_errors.h b/src/wallet/wallet_errors.h index 636f7bf6..33b0be51 100644 --- a/src/wallet/wallet_errors.h +++ b/src/wallet/wallet_errors.h @@ -321,10 +321,13 @@ namespace tools const currency::transaction m_tx; }; //---------------------------------------------------------------------------------------------------- - struct wallet_error_resync_needed + struct wallet_error_resync_needed : public std::exception { + wallet_error_resync_needed() + : std::exception("wallet_error_resync_needed") + {} }; - + //---------------------------------------------------------------------------------------------------- struct tx_parse_error : public refresh_error { explicit tx_parse_error(std::string&& loc, const currency::blobdata& tx_blob) diff --git a/tests/core_tests/wallet_tests.cpp b/tests/core_tests/wallet_tests.cpp index bb822de1..79eb631d 100644 --- a/tests/core_tests/wallet_tests.cpp +++ b/tests/core_tests/wallet_tests.cpp @@ -3822,6 +3822,7 @@ bool wallet_and_sweep_below::c1(currency::core& c, size_t ev_index, const std::v //------------------------------------------------------------------------------ + block_template_blacklist_test::block_template_blacklist_test() { REGISTER_CALLBACK_METHOD(block_template_blacklist_test, c1); @@ -3912,12 +3913,13 @@ bool block_template_blacklist_test::c1(currency::core& c, size_t ev_index, const return true; } +//------------------------------------------------------------------------------ + wallet_reorganize_and_trim_test::wallet_reorganize_and_trim_test() { REGISTER_CALLBACK_METHOD(wallet_reorganize_and_trim_test, c1); } - bool wallet_reorganize_and_trim_test::generate(std::vector& events) const { uint64_t ts = test_core_time::get_time(); @@ -3937,6 +3939,7 @@ bool wallet_reorganize_and_trim_test::generate(std::vector& ev return true; } + bool wallet_reorganize_and_trim_test::c1(currency::core& c, size_t ev_index, const std::vector& events) { std::shared_ptr miner_wlt = init_playtime_test_wallet(events, c, MINER_ACC_IDX); @@ -3970,5 +3973,3 @@ bool wallet_reorganize_and_trim_test::c1(currency::core& c, size_t ev_index, con } return true; } - -