Monero
Loading...
Searching...
No Matches
gen_trezor_base Class Reference

#include <trezor_tests.h>

Inheritance diagram for gen_trezor_base:
Collaboration diagram for gen_trezor_base:

Public Member Functions

 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 bool generate (std::vector< test_event_entry > &events)
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
size_t num_mixin () 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 > &)

Static Public Attributes

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

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

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

Friends

class tsx_builder
class boost::serialization::access

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

Constructor & Destructor Documentation

◆ gen_trezor_base() [1/2]

gen_trezor_base::gen_trezor_base ( )

◆ gen_trezor_base() [2/2]

gen_trezor_base::gen_trezor_base ( const gen_trezor_base & other)

◆ ~gen_trezor_base()

virtual gen_trezor_base::~gen_trezor_base ( )
inlinevirtual

Member Function Documentation

◆ add_shared_events()

void gen_trezor_base::add_shared_events ( std::vector< test_event_entry > & events)
virtual

◆ add_transactions_to_events()

void gen_trezor_base::add_transactions_to_events ( std::vector< test_event_entry > & events,
test_generator & generator,
const std::vector< cryptonote::transaction > & txs )
virtual

◆ clear()

void gen_trezor_base::clear ( )
virtual

◆ cur_hf()

uint8_t gen_trezor_base::cur_hf ( ) const
inline

◆ daemon() [1/2]

std::shared_ptr< mock_daemon > gen_trezor_base::daemon ( ) const
inline

◆ daemon() [2/2]

void gen_trezor_base::daemon ( std::shared_ptr< mock_daemon > daemon)
inline

◆ fix_hf()

void gen_trezor_base::fix_hf ( std::vector< test_event_entry > & events)
virtual

◆ fork()

void gen_trezor_base::fork ( gen_trezor_base & other)
virtual

◆ generate()

◆ head_block()

cryptonote::block gen_trezor_base::head_block ( ) const
inline

◆ head_hash()

crypto::hash gen_trezor_base::head_hash ( ) const
inline

◆ heavy_tests()

bool gen_trezor_base::heavy_tests ( ) const
inline

◆ init_fields()

void gen_trezor_base::init_fields ( )
protectedvirtual

◆ load()

void gen_trezor_base::load ( std::vector< test_event_entry > & events)
virtual

◆ mine_and_test()

void gen_trezor_base::mine_and_test ( std::vector< test_event_entry > & events)
virtual

◆ nettype()

cryptonote::network_type gen_trezor_base::nettype ( ) const
inline

◆ num_mixin()

size_t gen_trezor_base::num_mixin ( ) const
inline

◆ rct_config()

void gen_trezor_base::rct_config ( rct::RCTConfig rct_config)
inline

◆ rewind_blocks()

void gen_trezor_base::rewind_blocks ( std::vector< test_event_entry > & events,
size_t rewind_n,
uint8_t hf )
virtual

◆ serialize()

template<class Archive>
void gen_trezor_base::serialize ( Archive & ar,
const unsigned int  )
inlineprotected

◆ set_hard_fork()

void gen_trezor_base::set_hard_fork ( uint8_t hf)
virtual

◆ setup_args()

void gen_trezor_base::setup_args ( const std::string & trezor_path,
bool heavy_tests = false )
virtual

◆ setup_trezor()

void gen_trezor_base::setup_trezor ( )
protectedvirtual

◆ test_get_tx()

void gen_trezor_base::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

◆ test_setup()

void gen_trezor_base::test_setup ( std::vector< test_event_entry > & events)
virtual

◆ test_trezor_tx()

void gen_trezor_base::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

◆ update_client_settings()

void gen_trezor_base::update_client_settings ( )
protectedvirtual

◆ update_trackers()

void gen_trezor_base::update_trackers ( std::vector< test_event_entry > & events)
virtual

◆ verify_tx_key()

bool gen_trezor_base::verify_tx_key ( const ::crypto::secret_key & tx_priv,
const ::crypto::public_key & tx_pub,
const subaddresses_t & subs )
protectedvirtual

◆ boost::serialization::access

friend class boost::serialization::access
friend

◆ tsx_builder

friend class tsx_builder
friend

Member Data Documentation

◆ m_alice_account

cryptonote::account_base gen_trezor_base::m_alice_account
protected

◆ m_alice_spend_private

const std::string gen_trezor_base::m_alice_spend_private = m_master_seed_str
static

◆ m_alice_view_private

const std::string gen_trezor_base::m_alice_view_private = "a6ccd4ac344a295d1387f8d18c81bdd394f1845de84188e204514ef9370fd403"
static

◆ m_bob_account

cryptonote::account_base gen_trezor_base::m_bob_account
protected

◆ m_bt

block_tracker gen_trezor_base::m_bt
protected

◆ m_daemon

std::shared_ptr<mock_daemon> gen_trezor_base::m_daemon
protected

◆ m_device_name

const std::string gen_trezor_base::m_device_name = "Trezor:udp"
static

◆ m_device_seed

const std::string gen_trezor_base::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

◆ m_eve_account

cryptonote::account_base gen_trezor_base::m_eve_account
protected

◆ m_events

std::vector<test_event_entry> gen_trezor_base::m_events
protected

◆ m_generator

test_generator gen_trezor_base::m_generator
protected

◆ m_hard_forks

v_hardforks_t gen_trezor_base::m_hard_forks
protected

◆ m_head

cryptonote::block gen_trezor_base::m_head
protected

◆ m_heavy_tests

bool gen_trezor_base::m_heavy_tests
protected

◆ m_live_refresh_enabled

bool gen_trezor_base::m_live_refresh_enabled
protected

◆ m_master_seed_str

const std::string gen_trezor_base::m_master_seed_str = "14821d0bc5659b24cafbc889dc4fc60785ee08b65d71c525f81eeaba4f3a570f"
static

◆ m_miner_account

cryptonote::account_base gen_trezor_base::m_miner_account
protected

◆ m_network_type

cryptonote::network_type gen_trezor_base::m_network_type
protected

◆ m_rct_config

rct::RCTConfig gen_trezor_base::m_rct_config
protected

◆ m_test_get_tx_key

bool gen_trezor_base::m_test_get_tx_key
protected

◆ m_top_hard_fork

uint8_t gen_trezor_base::m_top_hard_fork
protected

◆ m_trezor

hw::trezor::device_trezor* gen_trezor_base::m_trezor
protected

◆ m_trezor_path

std::string gen_trezor_base::m_trezor_path
protected

◆ m_ts_start

const uint64_t gen_trezor_base::m_ts_start = 1397862000
static

◆ m_wallet_ts

const uint64_t gen_trezor_base::m_wallet_ts = m_ts_start - 60*60*24*4
static

◆ m_wl_alice

std::unique_ptr<tools::wallet2> gen_trezor_base::m_wl_alice
protected

◆ m_wl_bob

std::unique_ptr<tools::wallet2> gen_trezor_base::m_wl_bob
protected

◆ m_wl_eve

std::unique_ptr<tools::wallet2> gen_trezor_base::m_wl_eve
protected

The documentation for this class was generated from the following files: