@ -137,8 +137,8 @@ int main(int argc, char* argv[])
hw : : register_device ( HW_TREZOR_NAME , ensure_trezor_test_device ( ) ) ; // shim device for call tracking
// Bootstrapping common chain & accounts
const uint8_t initial_hf = ( uint8_t ) get_env_long ( " TEST_MIN_HF " , HF_VERSION_ CLSAG ) ;
const uint8_t max_hf = ( uint8_t ) get_env_long ( " TEST_MAX_HF " , HF_VERSION_ CLSAG ) ;
const uint8_t initial_hf = ( uint8_t ) get_env_long ( " TEST_MIN_HF " , HF_VERSION_ BULLETPROOF_PLUS ) ;
const uint8_t max_hf = ( uint8_t ) get_env_long ( " TEST_MAX_HF " , HF_VERSION_ BULLETPROOF_PLUS ) ;
auto sync_test = get_env_long ( " TEST_KI_SYNC " , 1 ) ;
MINFO ( " Test versions " < < MONERO_RELEASE_NAME < < " ' (v " < < MONERO_VERSION_FULL < < " ) " ) ;
MINFO ( " Testing hardforks [ " < < ( int ) initial_hf < < " , " < < ( int ) max_hf < < " ], sync-test: " < < sync_test ) ;
@ -1025,7 +1025,8 @@ void gen_trezor_base::test_trezor_tx(std::vector<test_event_entry>& events, std:
for ( auto & ptx : ptxs ) {
txs . txes . push_back ( get_construction_data_with_decrypted_short_payment_id ( ptx , * m_trezor ) ) ;
}
txs . transfers = std : : make_pair ( 0 , wallet_accessor_test : : get_transfers ( m_wl_alice . get ( ) ) ) ;
const auto transfers = wallet_accessor_test : : get_transfers ( m_wl_alice . get ( ) ) ;
txs . transfers = std : : make_tuple ( 0 , transfers . size ( ) , transfers ) ;
auto dev_cold = dynamic_cast < : : hw : : device_cold * > ( m_trezor ) ;
CHECK_AND_ASSERT_THROW_MES ( dev_cold , " Device does not implement cold signing interface " ) ;
@ -1055,7 +1056,10 @@ void gen_trezor_base::test_trezor_tx(std::vector<test_event_entry>& events, std:
CHECK_AND_ASSERT_THROW_MES ( resy , " Trezor tx_1 Nonsemantics failed " ) ;
tx_list . push_back ( c_ptx . tx ) ;
const crypto : : hash txhash = cryptonote : : get_transaction_hash ( c_ptx . tx ) ;
MDEBUG ( " Transaction: " < < dump_data ( c_ptx . tx ) ) ;
MDEBUG ( " Transaction hash: " < < epee : : string_tools : : pod_to_hex ( txhash ) ) ;
MDEBUG ( " Serialized transaction: " < < epee : : string_tools : : buff_to_hex_nodelimer ( tx_to_blob ( c_ptx . tx ) ) ) ;
}
add_transactions_to_events ( events , generator , tx_list ) ;
@ -1384,7 +1388,9 @@ tsx_builder * tsx_builder::add_destination(const tools::wallet2 * wallet, bool i
tsx_builder * tsx_builder : : set_integrated ( size_t idx )
{
CHECK_AND_ASSERT_THROW_MES ( m_destinations_orig . size ( ) > idx , " Destination size not big enough to set integrated flag " ) ;
m_integrated . insert ( idx ) ;
m_destinations_orig [ idx ] . is_integrated = true ;
return this ;
}
@ -1451,7 +1457,7 @@ tsx_builder * tsx_builder::construct_pending_tx(tools::wallet2::pending_tx &ptx,
auto change_addr = m_from - > get_account ( ) . get_keys ( ) . m_account_address ;
bool r = construct_tx_and_get_tx_key ( m_from - > get_account ( ) . get_keys ( ) , subaddresses , m_sources , destinations_copy ,
change_addr , extra ? extra . get ( ) : std : : vector < uint8_t > ( ) , tx , 0 , tx_key ,
additional_tx_keys , true , m_rct_config , nullptr ) ;
additional_tx_keys , true , m_rct_config , this- > m_tester - > cur_hf ( ) > = HF_VERSION_VIEW_TAGS ) ;
CHECK_AND_ASSERT_THROW_MES ( r , " Transaction construction failed " ) ;
// Selected transfers permutation
@ -1927,6 +1933,11 @@ bool wallet_api_tests::generate(std::vector<test_event_entry>& events)
Monero : : WalletManager * wmgr = Monero : : WalletManagerFactory : : getWalletManager ( ) ;
std : : unique_ptr < Monero : : Wallet > w { wmgr - > createWalletFromDevice ( wallet_path , " " , api_net_type , m_trezor_path , 1 ) } ;
CHECK_AND_ASSERT_THROW_MES ( w - > init ( daemon ( ) - > rpc_addr ( ) , 0 ) , " Wallet init fail " ) ;
auto walletImpl = dynamic_cast < Monero : : WalletImpl * > ( w . get ( ) ) ;
CHECK_AND_ASSERT_THROW_MES ( walletImpl , " Dynamic wallet cast failed " ) ;
WalletApiAccessorTest : : allow_mismatched_daemon_version ( walletImpl , true ) ;
CHECK_AND_ASSERT_THROW_MES ( w - > refresh ( ) , " Refresh fail " ) ;
uint64_t balance = w - > balance ( 0 ) ;
MDEBUG ( " Balance: " < < balance ) ;