Electroneum
Loading...
Searching...
No Matches
gen_trezor_4utxo_acc1 Class Reference

#include <trezor_tests.h>

Inheritance diagram for gen_trezor_4utxo_acc1:
Collaboration diagram for gen_trezor_4utxo_acc1:

Public Member Functions

bool generate (std::vector< test_event_entry > &events) override
Public Member Functions inherited from gen_trezor_base
 gen_trezor_base ()
 gen_trezor_base (const gen_trezor_base &other)
virtual ~gen_trezor_base ()
virtual void setup_args (const std::string &trezor_path, bool heavy_tests=false)
virtual void load (std::vector< test_event_entry > &events)
virtual void fix_hf (std::vector< test_event_entry > &events)
virtual void update_trackers (std::vector< test_event_entry > &events)
virtual void fork (gen_trezor_base &other)
virtual void clear ()
virtual void add_shared_events (std::vector< test_event_entry > &events)
virtual void test_setup (std::vector< test_event_entry > &events)
virtual void add_transactions_to_events (std::vector< test_event_entry > &events, test_generator &generator, const std::vector< cryptonote::transaction > &txs)
virtual void test_trezor_tx (std::vector< test_event_entry > &events, std::vector< tools::wallet2::pending_tx > &ptxs, std::vector< cryptonote::address_parse_info > &dsts_info, test_generator &generator, std::vector< tools::wallet2 * > wallets, bool is_sweep=false)
virtual void test_get_tx (std::vector< test_event_entry > &events, std::vector< tools::wallet2 * > wallets, const std::vector< tools::wallet2::pending_tx > &ptxs, const std::vector< std::string > &aux_tx_info)
virtual void mine_and_test (std::vector< test_event_entry > &events)
virtual void rewind_blocks (std::vector< test_event_entry > &events, size_t rewind_n, uint8_t hf)
virtual void set_hard_fork (uint8_t hf)
crypto::hash head_hash () const
cryptonote::block head_block () const
bool heavy_tests () const
void rct_config (rct::RCTConfig rct_config)
uint8_t cur_hf () const
cryptonote::network_type nettype () const
std::shared_ptr< mock_daemondaemon () const
void daemon (std::shared_ptr< mock_daemon > daemon)
Public Member Functions inherited from test_chain_unit_base
void register_callback (const std::string &cb_name, verify_callback cb)
bool verify (const std::string &cb_name, cryptonote::core &c, size_t ev_index, const std::vector< test_event_entry > &events)
bool check_block_verification_context (const cryptonote::block_verification_context &bvc, size_t event_idx, const cryptonote::block &)
bool check_tx_verification_context (const cryptonote::tx_verification_context &tvc, bool, size_t, const cryptonote::transaction &)
bool check_tx_verification_context_array (const std::vector< cryptonote::tx_verification_context > &tvcs, size_t, size_t, const std::vector< cryptonote::transaction > &)

Additional Inherited Members

Public Types inherited from test_chain_unit_base
typedef boost::function< bool(cryptonote::core &c, size_t ev_index, const std::vector< test_event_entry > &events)> verify_callback
typedef std::map< std::string, verify_callbackcallbacks_map
Static Public Attributes inherited from gen_trezor_base
static const uint64_t m_ts_start = 1397862000
static const uint64_t m_wallet_ts = m_ts_start - 60*60*24*4
static const std::string m_device_name = "Trezor:udp"
static const std::string m_master_seed_str = "14821d0bc5659b24cafbc889dc4fc60785ee08b65d71c525f81eeaba4f3a570f"
static const std::string m_device_seed = "permit universe parent weapon amused modify essay borrow tobacco budget walnut lunch consider gallery ride amazing frog forget treat market chapter velvet useless topple"
static const std::string m_alice_spend_private = m_master_seed_str
static const std::string m_alice_view_private = "a6ccd4ac344a295d1387f8d18c81bdd394f1845de84188e204514ef9370fd403"
Protected Member Functions inherited from gen_trezor_base
virtual void setup_trezor ()
virtual void init_fields ()
virtual void update_client_settings ()
virtual bool verify_tx_key (const ::crypto::secret_key &tx_priv, const ::crypto::public_key &tx_pub, const subaddresses_t &subs)
template<class Archive>
void serialize (Archive &ar, const unsigned int)
Protected Attributes inherited from gen_trezor_base
test_generator m_generator
block_tracker m_bt
cryptonote::network_type m_network_type
std::shared_ptr< mock_daemonm_daemon
uint8_t m_top_hard_fork
v_hardforks_t m_hard_forks
cryptonote::block m_head
std::vector< test_event_entrym_events
std::string m_trezor_path
bool m_heavy_tests
bool m_test_get_tx_key
rct::RCTConfig m_rct_config
bool m_live_refresh_enabled
cryptonote::account_base m_miner_account
cryptonote::account_base m_bob_account
cryptonote::account_base m_alice_account
cryptonote::account_base m_eve_account
hw::trezor::device_trezor * m_trezor
std::unique_ptr< tools::wallet2m_wl_alice
std::unique_ptr< tools::wallet2m_wl_bob
std::unique_ptr< tools::wallet2m_wl_eve

Detailed Description

Definition at line 279 of file trezor_tests.h.

Member Function Documentation

◆ generate()

bool gen_trezor_4utxo_acc1::generate ( std::vector< test_event_entry > & events)
overridevirtual

Reimplemented from gen_trezor_base.

Definition at line 1715 of file trezor_tests.cpp.

1716{
1718 t_builder->cur_height(num_blocks(events) - 1)
1719 ->mixin(TREZOR_TEST_MIXIN)
1720 ->fee(TREZOR_TEST_FEE)
1721 ->from(m_wl_alice.get(), 1)
1722 ->compute_sources(4, MK_COINS(1), -1, -1)
1723 ->add_destination(m_wl_eve->get_subaddress({0, 1}), true, 1000)
1724 ->rct_config(m_rct_config)
1725 ->build_tx();
1726
1728}
uint64_t num_blocks(const std::vector< test_event_entry > &events)
#define MK_COINS(amount)
Definition chaingen.h:1060
std::unique_ptr< tools::wallet2 > m_wl_alice
rct::RCTConfig m_rct_config
std::unique_ptr< tools::wallet2 > m_wl_eve
#define TREZOR_TEST_SUFFIX()
#define TREZOR_TEST_PREFIX()
#define TREZOR_TEST_FEE
#define TREZOR_TEST_MIXIN
Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/tests/trezor/trezor_tests.h
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/tests/trezor/trezor_tests.cpp