Monero
trezor_tests.h
Go to the documentation of this file.
1 // Copyright (c) 2014-2022, The Monero Project
2 //
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without modification, are
6 // permitted provided that the following conditions are met:
7 //
8 // 1. Redistributions of source code must retain the above copyright notice, this list of
9 // conditions and the following disclaimer.
10 //
11 // 2. Redistributions in binary form must reproduce the above copyright notice, this list
12 // of conditions and the following disclaimer in the documentation and/or other
13 // materials provided with the distribution.
14 //
15 // 3. Neither the name of the copyright holder nor the names of its contributors may be
16 // used to endorse or promote products derived from this software without specific
17 // prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
20 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
22 // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
27 // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 //
29 // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
30 
31 #pragma once
32 
34 #include <wallet/api/wallet2_api.h>
35 #include "daemon.h"
36 #include "../core_tests/chaingen.h"
37 #include "../core_tests/wallet_tools.h"
38 
39 #define TREZOR_TEST_FEE 90000000000
40 #define TREZOR_TEST_CLSAG_MIXIN 11
41 #define TREZOR_TEST_HF15_MIXIN 16
42 #define TREZOR_TEST_MIXIN TREZOR_TEST_CLSAG_MIXIN
43 
44 /************************************************************************/
45 /* */
46 /************************************************************************/
47 class tsx_builder;
49 {
50 public:
51  friend class tsx_builder;
52 
54  gen_trezor_base(const gen_trezor_base &other);
55  virtual ~gen_trezor_base() {};
56 
57  virtual void setup_args(const std::string & trezor_path, bool heavy_tests=false);
58  virtual bool generate(std::vector<test_event_entry>& events);
59  virtual void load(std::vector<test_event_entry>& events); // load events, init test obj
60  virtual void fix_hf(std::vector<test_event_entry>& events);
61  virtual void update_trackers(std::vector<test_event_entry>& events);
62 
63  virtual void fork(gen_trezor_base & other); // fork generated chain to another test
64  virtual void clear(); // clears m_events, bt, generator, hforks
65  virtual void add_shared_events(std::vector<test_event_entry>& events); // m_events -> events
66  virtual void test_setup(std::vector<test_event_entry>& events); // init setup env, wallets
67 
68  virtual void add_transactions_to_events(
69  std::vector<test_event_entry>& events,
70  test_generator &generator,
71  const std::vector<cryptonote::transaction> &txs);
72 
73  virtual void test_trezor_tx(
74  std::vector<test_event_entry>& events,
75  std::vector<tools::wallet2::pending_tx>& ptxs,
76  std::vector<cryptonote::address_parse_info>& dsts_info,
77  test_generator &generator,
78  std::vector<tools::wallet2*> wallets,
79  bool is_sweep=false);
80 
81  virtual void test_get_tx(
82  std::vector<test_event_entry>& events,
83  std::vector<tools::wallet2*> wallets,
84  const std::vector<tools::wallet2::pending_tx> &ptxs,
85  const std::vector<std::string> &aux_tx_info);
86 
87  virtual void mine_and_test(std::vector<test_event_entry>& events);
88 
89  virtual void rewind_blocks(std::vector<test_event_entry>& events, size_t rewind_n, uint8_t hf);
90 
91  virtual void set_hard_fork(uint8_t hf);
92 
94  cryptonote::block head_block() const { return m_head; }
95  bool heavy_tests() const { return m_heavy_tests; }
97  uint8_t cur_hf() const { return m_hard_forks.size() > 0 ? m_hard_forks.back().first : 0; }
100  std::shared_ptr<mock_daemon> daemon() const { return m_daemon; }
101  void daemon(std::shared_ptr<mock_daemon> daemon){ m_daemon = std::move(daemon); }
102 
103  // Static configuration
104  static const uint64_t m_ts_start;
105  static const uint64_t m_wallet_ts;
111 
112 protected:
113  virtual void setup_trezor();
114  virtual void init_fields();
115  virtual void update_client_settings();
116  virtual bool verify_tx_key(const ::crypto::secret_key & tx_priv, const ::crypto::public_key & tx_pub, const subaddresses_t & subs);
117 
121  std::shared_ptr<mock_daemon> m_daemon;
122 
126  std::vector<test_event_entry> m_events;
127 
133 
138  hw::trezor::device_trezor * m_trezor;
139  std::unique_ptr<tools::wallet2> m_wl_alice;
140  std::unique_ptr<tools::wallet2> m_wl_bob;
141  std::unique_ptr<tools::wallet2> m_wl_eve;
142 
144 
145  template<class Archive>
146  void serialize(Archive & ar, const unsigned int /*version*/)
147  {
148  ar & m_generator;
149  ar & m_network_type;
150  }
151 };
152 
153 class tsx_builder {
154 public:
157 
158  tsx_builder(gen_trezor_base * tester): m_tester(tester), m_from(nullptr), m_account(0),
161 
163  tsx_builder * mixin(size_t mixin=TREZOR_TEST_MIXIN) { m_mixin = mixin; return this; }
166  tsx_builder * from(tools::wallet2 *from, uint32_t account=0) { m_from = from; m_account=account; return this; }
167  tsx_builder * sources(std::vector<cryptonote::tx_source_entry> & sources, std::vector<size_t> & selected_transfers);
168  tsx_builder * compute_sources(boost::optional<size_t> num_utxo=boost::none, boost::optional<uint64_t> min_amount=boost::none, ssize_t offset=-1, int step=1, boost::optional<fnc_accept_tx_source_t> fnc_accept=boost::none);
169  tsx_builder * compute_sources_to_sub(boost::optional<size_t> num_utxo=boost::none, boost::optional<uint64_t> min_amount=boost::none, ssize_t offset=-1, int step=1, boost::optional<fnc_accept_tx_source_t> fnc_accept=boost::none);
170  tsx_builder * compute_sources_to_sub_acc(boost::optional<size_t> num_utxo=boost::none, boost::optional<uint64_t> min_amount=boost::none, ssize_t offset=-1, int step=1, boost::optional<fnc_accept_tx_source_t> fnc_accept=boost::none);
171 
172  tsx_builder * destinations(std::vector<cryptonote::tx_destination_entry> &dsts);
174  tsx_builder * add_destination(const tools::wallet2 * wallet, bool is_subaddr=false, uint64_t amount=1000);
175  tsx_builder * add_destination(const var_addr_t addr, bool is_subaddr=false, uint64_t amount=1000);
176  tsx_builder * set_integrated(size_t idx);
178 
179  tsx_builder * build_tx();
180  tsx_builder * construct_pending_tx(tools::wallet2::pending_tx &ptx, boost::optional<std::vector<uint8_t>> extra = boost::none);
182  std::vector<tools::wallet2::pending_tx> build();
183  std::vector<cryptonote::address_parse_info> dest_info(){ return m_dsts_info; }
184 
185 protected:
188  std::vector<tools::wallet2::pending_tx> m_ptxs; // all transactions
189 
190  // current transaction
191  size_t m_mixin;
196  std::vector<size_t> m_selected_transfers;
197  std::vector<cryptonote::tx_source_entry> m_sources;
198  std::vector<cryptonote::tx_destination_entry> m_destinations;
199  std::vector<cryptonote::tx_destination_entry> m_destinations_orig;
200  std::vector<cryptonote::address_parse_info> m_dsts_info;
201  std::unordered_set<size_t> m_integrated;
204 };
205 
206 // Trezor device ship to track actual method calls.
207 class device_trezor_test : public hw::trezor::device_trezor {
208 public:
211 
213 
214  void clear_test_counters();
216 
217  bool compute_key_image(const ::cryptonote::account_keys &ack, const ::crypto::public_key &out_key,
218  const ::crypto::key_derivation &recv_derivation, size_t real_output_index,
219  const ::cryptonote::subaddress_index &received_index, ::cryptonote::keypair &in_ephemeral,
220  ::crypto::key_image &ki) override;
221 
222 protected:
224  hw::tx_aux_data &aux_data, std::shared_ptr<hw::trezor::protocol::tx::Signer> &signer) override;
225 };
226 
227 // Tests
229 {
230 public:
231  bool generate(std::vector<test_event_entry>& events) override;
232 };
233 
235 {
236 public:
237  bool generate(std::vector<test_event_entry>& events) override;
238 };
239 
241 {
242 public:
243  bool generate(std::vector<test_event_entry>& events) override;
244 };
245 
247 {
248 public:
249  bool generate(std::vector<test_event_entry>& events) override;
250 };
251 
253 {
254 public:
255  bool generate(std::vector<test_event_entry>& events) override;
256 };
257 
259 {
260 public:
261  bool generate(std::vector<test_event_entry>& events) override;
262 };
263 
265 {
266 public:
267  bool generate(std::vector<test_event_entry>& events) override;
268 };
269 
271 {
272 public:
273  bool generate(std::vector<test_event_entry>& events) override;
274 };
275 
277 {
278 public:
279  bool generate(std::vector<test_event_entry>& events) override;
280 };
281 
283 {
284 public:
285  bool generate(std::vector<test_event_entry>& events) override;
286 };
287 
289 {
290 public:
291  bool generate(std::vector<test_event_entry>& events) override;
292 };
293 
295 {
296 public:
297  bool generate(std::vector<test_event_entry>& events) override;
298 };
299 
301 {
302 public:
303  bool generate(std::vector<test_event_entry>& events) override;
304 };
305 
307 {
308 public:
309  bool generate(std::vector<test_event_entry>& events) override;
310 };
311 
313 {
314 public:
315  bool generate(std::vector<test_event_entry>& events) override;
316 };
317 
319 {
320 public:
321  bool generate(std::vector<test_event_entry>& events) override;
322 };
323 
325 {
326 public:
327  bool generate(std::vector<test_event_entry>& events) override;
328 };
329 
330 // Wallet::API tests
332 {
333 public:
334  virtual ~wallet_api_tests();
335  void init();
336  bool generate(std::vector<test_event_entry>& events) override;
337 
338 protected:
339  boost::filesystem::path m_wallet_dir;
340 };
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1548
#define TREZOR_TEST_HF15_MIXIN
Definition: trezor_tests.h:41
bool compute_key_image(const ::cryptonote::account_keys &ack, const ::crypto::public_key &out_key, const ::crypto::key_derivation &recv_derivation, size_t real_output_index, const ::cryptonote::subaddress_index &received_index, ::cryptonote::keypair &in_ephemeral, ::crypto::key_image &ki) override
Definition: trezor_tests.cpp:1530
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1662
cryptonote::network_type m_network_type
Definition: trezor_tests.h:120
gen_trezor_base()
Definition: trezor_tests.cpp:618
cryptonote::transaction m_tx
Definition: trezor_tests.h:195
#define HF_VERSION_BULLETPROOF_PLUS
Definition: cryptonote_config.h:192
virtual bool verify_tx_key(const ::crypto::secret_key &tx_priv, const ::crypto::public_key &tx_pub, const subaddresses_t &subs)
Definition: trezor_tests.cpp:1168
virtual void test_setup(std::vector< test_event_entry > &events)
Definition: trezor_tests.cpp:971
rct::RCTConfig m_rct_config
Definition: trezor_tests.h:131
void rct_config(rct::RCTConfig rct_config)
Definition: trezor_tests.h:96
tsx_builder * cur_height(uint64_t cur_height)
Definition: trezor_tests.h:162
binary_archive< false > ar
Definition: cold-outputs.cpp:54
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1921
cryptonote::block m_head
Definition: trezor_tests.h:125
Definition: device_cold.hpp:40
std::vector< cryptonote::tx_source_entry > m_sources
Definition: trezor_tests.h:197
Definition: wallet2.h:231
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1871
Definition: cryptonote_basic.h:538
tsx_builder * compute_sources_to_sub_acc(boost::optional< size_t > num_utxo=boost::none, boost::optional< uint64_t > min_amount=boost::none, ssize_t offset=-1, int step=1, boost::optional< fnc_accept_tx_source_t > fnc_accept=boost::none)
Definition: trezor_tests.cpp:1347
size_t m_tx_sign_ctr
Definition: trezor_tests.h:209
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1596
virtual void add_shared_events(std::vector< test_event_entry > &events)
Definition: trezor_tests.cpp:684
tsx_builder * mixin(size_t mixin=TREZOR_TEST_MIXIN)
Definition: trezor_tests.h:163
std::vector< size_t > m_selected_transfers
Definition: trezor_tests.h:196
::std::string string
Definition: gtest-port.h:1097
Definition: trezor_tests.h:246
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)
Definition: trezor_tests.cpp:1016
POD_CLASS key_derivation
Definition: crypto.h:88
Definition: cryptonote_basic.h:474
block_tracker m_bt
Definition: trezor_tests.h:119
static const uint64_t m_wallet_ts
Definition: trezor_tests.h:105
bool m_live_refresh_enabled
Definition: trezor_tests.h:132
std::unordered_map< crypto::public_key, cryptonote::subaddress_index > subaddresses_t
Definition: chaingen.h:365
tsx_builder * sources(std::vector< cryptonote::tx_source_entry > &sources, std::vector< size_t > &selected_transfers)
Definition: trezor_tests.cpp:1300
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1590
boost::filesystem::path m_wallet_dir
Definition: trezor_tests.h:339
std::unordered_set< size_t > m_integrated
Definition: trezor_tests.h:201
cryptonote::account_base m_alice_account
Definition: trezor_tests.h:136
epee::mlocked< tools::scrubbed< ec_scalar > > secret_key
Definition: crypto.h:72
gen_trezor_base * m_tester
Definition: trezor_tests.h:186
tsx_builder * compute_sources_to_sub(boost::optional< size_t > num_utxo=boost::none, boost::optional< uint64_t > min_amount=boost::none, ssize_t offset=-1, int step=1, boost::optional< fnc_accept_tx_source_t > fnc_accept=boost::none)
Definition: trezor_tests.cpp:1332
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1712
uint64_t m_cur_height
Definition: trezor_tests.h:187
boost::variant< cryptonote::account_public_address, cryptonote::account_keys, cryptonote::account_base, cryptonote::tx_destination_entry > var_addr_t
Definition: chaingen.h:368
unsigned char uint8_t
Definition: stdint.h:124
virtual void setup_args(const std::string &trezor_path, bool heavy_tests=false)
Definition: trezor_tests.cpp:634
Definition: chaingen.h:376
uint8_t m_top_hard_fork
Definition: trezor_tests.h:123
tsx_builder()
Definition: trezor_tests.h:155
cryptonote::block head_block() const
Definition: trezor_tests.h:94
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1828
tsx_builder(gen_trezor_base *tester)
Definition: trezor_tests.h:158
Definition: trezor_tests.h:207
static const std::string m_alice_view_private
Definition: trezor_tests.h:110
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)
Definition: trezor_tests.cpp:1184
std::string m_trezor_path
Definition: trezor_tests.h:128
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1742
std::vector< cryptonote::tx_destination_entry > m_destinations
Definition: trezor_tests.h:198
tools::wallet2::unsigned_tx_set unsigned_tx_set
Definition: protocol.hpp:155
Definition: trezor_tests.h:234
virtual ~wallet_api_tests()
Definition: trezor_tests.cpp:1906
size_t num_mixin() const
Definition: trezor_tests.h:98
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1790
bool heavy_tests() const
Definition: trezor_tests.h:95
cryptonote::account_base m_miner_account
Definition: trezor_tests.h:134
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1856
Definition: trezor_tests.h:318
void tx_sign(hw::wallet_shim *wallet, const ::tools::wallet2::unsigned_tx_set &unsigned_tx, size_t idx, hw::tx_aux_data &aux_data, std::shared_ptr< hw::trezor::protocol::tx::Signer > &signer) override
Definition: trezor_tests.cpp:1542
Definition: trezor_tests.h:252
std::vector< cryptonote::tx_destination_entry > m_destinations_orig
Definition: trezor_tests.h:199
std::unique_ptr< tools::wallet2 > m_wl_bob
Definition: trezor_tests.h:140
tsx_builder * fee(uint64_t fee=TREZOR_TEST_FEE)
Definition: trezor_tests.h:164
Definition: trezor_tests.h:153
virtual void fork(gen_trezor_base &other)
Definition: trezor_tests.cpp:650
std::vector< cryptonote::address_parse_info > dest_info()
Definition: trezor_tests.h:183
tsx_builder * construct_pending_tx(tools::wallet2::pending_tx &ptx, boost::optional< std::vector< uint8_t >> extra=boost::none)
Definition: trezor_tests.cpp:1441
virtual void update_trackers(std::vector< test_event_entry > &events)
Definition: trezor_tests.cpp:966
void setup_for_tests(const std::string &trezor_path, const std::string &seed, cryptonote::network_type network_type)
Definition: trezor_tests.cpp:1513
tsx_builder * rct_config(const rct::RCTConfig &rct_config)
Definition: trezor_tests.h:177
Definition: trezor_tests.h:288
unsigned int uint32_t
Definition: stdint.h:126
tools::wallet2 * m_from
Definition: trezor_tests.h:193
virtual void init_fields()
Definition: trezor_tests.cpp:692
Definition: chaingen.h:182
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1584
std::vector< tools::wallet2::pending_tx > ptx
Definition: cold-transaction.cpp:56
#define TREZOR_TEST_MIXIN
Definition: trezor_tests.h:42
Definition: account.h:73
Definition: trezor_tests.h:294
v_hardforks_t m_hard_forks
Definition: trezor_tests.h:124
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1773
#define TREZOR_TEST_CLSAG_MIXIN
Definition: trezor_tests.h:40
Definition: trezor_tests.h:331
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1694
virtual void add_transactions_to_events(std::vector< test_event_entry > &events, test_generator &generator, const std::vector< cryptonote::transaction > &txs)
Definition: trezor_tests.cpp:992
static const std::string m_alice_spend_private
Definition: trezor_tests.h:109
virtual void fix_hf(std::vector< test_event_entry > &events)
Definition: trezor_tests.cpp:947
unsigned __int64 uint64_t
Definition: stdint.h:136
void daemon(std::shared_ptr< mock_daemon > daemon)
Definition: trezor_tests.h:101
#define TREZOR_TEST_FEE
Definition: trezor_tests.h:39
device_trezor_test()
Definition: trezor_tests.cpp:1506
Definition: trezor_tests.h:276
friend class boost::serialization::access
Definition: trezor_tests.h:143
Definition: trezor_tests.h:324
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1757
rct::RCTConfig m_rct_config
Definition: trezor_tests.h:203
static const std::string m_device_name
Definition: trezor_tests.h:106
size_t m_mixin
Definition: trezor_tests.h:191
Definition: trezor_tests.h:312
Definition: wallet.py:1
crypto::hash head_hash() const
Definition: trezor_tests.h:93
tsx_builder * payment_id(const std::string &payment_id)
Definition: trezor_tests.h:165
virtual ~gen_trezor_base()
Definition: trezor_tests.h:55
static const std::string m_device_seed
Definition: trezor_tests.h:108
Definition: trezor_tests.h:282
POD_CLASS public_key
Definition: crypto.h:61
uint32_t m_account
Definition: trezor_tests.h:194
Definition: rctTypes.h:307
Definition: trezor_tests.h:270
hw::trezor::device_trezor * m_trezor
Definition: trezor_tests.h:138
Definition: trezor_tests.h:258
Definition: device_cold.hpp:44
size_t m_compute_key_image_ctr
Definition: trezor_tests.h:210
std::vector< tools::wallet2::pending_tx > build()
Definition: trezor_tests.cpp:1501
std::string m_payment_id
Definition: trezor_tests.h:202
static const std::string m_master_seed_str
Definition: trezor_tests.h:107
virtual void rewind_blocks(std::vector< test_event_entry > &events, size_t rewind_n, uint8_t hf)
Definition: trezor_tests.cpp:935
network_type
Definition: cryptonote_config.h:301
Definition: trezor_tests.h:300
virtual bool generate(std::vector< test_event_entry > &events)
Definition: trezor_tests.cpp:712
const T & move(const T &t)
Definition: gtest-port.h:1317
std::unique_ptr< tools::wallet2 > m_wl_eve
Definition: trezor_tests.h:141
std::vector< test_event_entry > m_events
Definition: trezor_tests.h:126
std::shared_ptr< mock_daemon > m_daemon
Definition: trezor_tests.h:121
cryptonote::account_base m_bob_account
Definition: trezor_tests.h:135
test_generator m_generator
Definition: trezor_tests.h:118
std::shared_ptr< mock_daemon > daemon() const
Definition: trezor_tests.h:100
std::vector< cryptonote::address_parse_info > m_dsts_info
Definition: trezor_tests.h:200
POD_CLASS key_image
Definition: crypto.h:92
Definition: trezor_tests.h:306
Definition: trezor_tests.h:48
void init()
Definition: trezor_tests.cpp:1900
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1677
Definition: trezor_tests.h:228
Definition: rctTypes.h:308
const uint8_t seed[32]
Definition: code-generator.cpp:37
Definition: cryptonote_tx_utils.h:74
Definition: trezor_tests.h:264
virtual void setup_trezor()
Definition: trezor_tests.cpp:640
std::vector< tools::wallet2::pending_tx > m_ptxs
Definition: trezor_tests.h:188
virtual void clear()
Definition: trezor_tests.cpp:675
Definition: wallet2.h:655
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1727
crypto::hash get_block_hash(uint64_t height)
Definition: output_distribution.cpp:95
void serialize(Archive &ar, const unsigned int)
Definition: trezor_tests.h:146
uint8_t cur_hf() const
Definition: trezor_tests.h:97
POD_CLASS hash
Definition: hash.h:49
virtual void update_client_settings()
Definition: trezor_tests.cpp:704
bool m_heavy_tests
Definition: trezor_tests.h:129
Definition: trezor_tests.h:240
tsx_builder * from(tools::wallet2 *from, uint32_t account=0)
Definition: trezor_tests.h:166
Definition: chaingen.h:165
bool m_test_get_tx_key
Definition: trezor_tests.h:130
bool generate(std::vector< test_event_entry > &events) override
Definition: trezor_tests.cpp:1807
void clear_test_counters()
Definition: trezor_tests.cpp:1508
static const uint64_t m_ts_start
Definition: trezor_tests.h:104
tsx_builder * destinations(std::vector< cryptonote::tx_destination_entry > &dsts)
Definition: trezor_tests.cpp:1362
cryptonote::account_base m_eve_account
Definition: trezor_tests.h:137
uint64_t m_fee
Definition: trezor_tests.h:192
tsx_builder * compute_sources(boost::optional< size_t > num_utxo=boost::none, boost::optional< uint64_t > min_amount=boost::none, ssize_t offset=-1, int step=1, boost::optional< fnc_accept_tx_source_t > fnc_accept=boost::none)
Definition: trezor_tests.cpp:1307
tsx_builder * add_destination(const cryptonote::tx_destination_entry &dst)
Definition: trezor_tests.cpp:1368
tsx_builder * build_tx()
Definition: trezor_tests.cpp:1405
Definition: cryptonote_basic.h:204
std::unique_ptr< tools::wallet2 > m_wl_alice
Definition: trezor_tests.h:139
virtual void load(std::vector< test_event_entry > &events)
Definition: trezor_tests.cpp:877
tsx_builder * set_integrated(size_t idx)
Definition: trezor_tests.cpp:1386
virtual void set_hard_fork(uint8_t hf)
Definition: trezor_tests.cpp:1267
std::vector< std::pair< uint8_t, uint64_t > > v_hardforks_t
Definition: chaingen.h:137
tsx_builder * clear_current()
Definition: trezor_tests.cpp:1392
virtual void mine_and_test(std::vector< test_event_entry > &events)
Definition: trezor_tests.cpp:1240
wallets
Definition: console.py:23
cryptonote::network_type nettype() const
Definition: trezor_tests.h:99