diff options
author | Dusan Klinec <dusan.klinec@gmail.com> | 2019-02-27 16:55:31 +0100 |
---|---|---|
committer | Dusan Klinec <dusan.klinec@gmail.com> | 2019-03-20 21:11:02 +0100 |
commit | c9b13fbbc23d065afca62a499484c283079c0fa5 (patch) | |
tree | 5bd43f21891b3a00b0ef7807c9e91f54f761aec1 /tests/core_tests | |
parent | device/trezor: HF10 support added, wallet::API (diff) | |
download | monero-c9b13fbbc23d065afca62a499484c283079c0fa5.tar.xz |
tests/trezor: HF9 and HF10 tests
- tests fixes for HF10, builder change, rct_config; fix_chain
- get_tx_key test
- proper testing after live refresh added
- live refresh synthetic test
- log available funds for easier test construction
- wallet::API tests with mocked daemon
Diffstat (limited to 'tests/core_tests')
-rw-r--r-- | tests/core_tests/chaingen.h | 9 | ||||
-rw-r--r-- | tests/core_tests/wallet_tools.cpp | 1 |
2 files changed, 4 insertions, 6 deletions
diff --git a/tests/core_tests/chaingen.h b/tests/core_tests/chaingen.h index aa409b985..e750c7add 100644 --- a/tests/core_tests/chaingen.h +++ b/tests/core_tests/chaingen.h @@ -754,7 +754,7 @@ struct get_test_options { }; //-------------------------------------------------------------------------- template<class t_test_class> -inline bool do_replay_events_get_core(std::vector<test_event_entry>& events, cryptonote::core **core) +inline bool do_replay_events_get_core(std::vector<test_event_entry>& events, cryptonote::core *core) { boost::program_options::options_description desc("Allowed options"); cryptonote::core::init_options(desc); @@ -768,8 +768,7 @@ inline bool do_replay_events_get_core(std::vector<test_event_entry>& events, cry if (!r) return false; - *core = new cryptonote::core(nullptr); - auto & c = **core; + auto & c = *core; // FIXME: make sure that vm has arg_testnet_on set to true or false if // this test needs for it to be so. @@ -825,9 +824,9 @@ inline bool replay_events_through_core_validate(std::vector<test_event_entry>& e template<class t_test_class> inline bool do_replay_events(std::vector<test_event_entry>& events) { - cryptonote::core * core; + cryptonote::core core(nullptr); bool ret = do_replay_events_get_core<t_test_class>(events, &core); - core->deinit(); + core.deinit(); return ret; } //-------------------------------------------------------------------------- diff --git a/tests/core_tests/wallet_tools.cpp b/tests/core_tests/wallet_tools.cpp index ff7ce3a34..616774d18 100644 --- a/tests/core_tests/wallet_tools.cpp +++ b/tests/core_tests/wallet_tools.cpp @@ -17,7 +17,6 @@ void wallet_accessor_test::set_account(tools::wallet2 * wallet, cryptonote::acco { wallet->clear(); wallet->m_account = account; - wallet->m_nettype = MAINNET; wallet->m_key_device_type = account.get_device().get_type(); wallet->m_account_public_address = account.get_keys().m_account_address; |