715 std::vector<size_t> block_weights;
717 events.push_back(blk_gen);
718 generator.add_block(blk_gen, 0, block_weights, 0);
727 events.push_back(*ac);
734 std::list<cryptonote::transaction> tx_list;
736 const uint64_t already_generated_coins = generator.get_already_generated_coins(prev_id);
737 block_weights.clear();
739 generator.construct_block(blk_0, 1, prev_id,
m_miner_account,
m_ts_start, already_generated_coins, block_weights, tx_list);
742 events.push_back(blk_0);
776 auto addr_alice_sub_0_1 =
m_wl_alice->get_subaddress({0, 1});
777 auto addr_alice_sub_0_2 =
m_wl_alice->get_subaddress({0, 2});
778 auto addr_alice_sub_0_3 =
m_wl_alice->get_subaddress({0, 3});
779 auto addr_alice_sub_0_4 =
m_wl_alice->get_subaddress({0, 4});
780 auto addr_alice_sub_0_5 =
m_wl_alice->get_subaddress({0, 5});
781 auto addr_alice_sub_1_0 =
m_wl_alice->get_subaddress({1, 0});
782 auto addr_alice_sub_1_1 =
m_wl_alice->get_subaddress({1, 1});
783 auto addr_alice_sub_1_2 =
m_wl_alice->get_subaddress({1, 2});
789 for(
size_t i = 0; i < target_rct; ++i)
801 MAKE_TX_MIX_DEST_LIST_RCT(events, txs_blk_5,
m_miner_account,
build_dsts({{addr_alice_sub_0_1,
true,
MK_COINS(1) >> 1}, {addr_alice_sub_0_2,
true,
MK_COINS(1) >> 1}}), 10, blk_4);
802 MAKE_TX_MIX_DEST_LIST_RCT(events, txs_blk_5,
m_miner_account,
build_dsts({{addr_alice_sub_0_1,
true,
MK_COINS(1) >> 1}, {addr_alice_sub_0_2,
true,
MK_COINS(1) >> 1}, {addr_alice_sub_0_3,
true,
MK_COINS(1) >> 1}}), 10, blk_4);
803 MAKE_TX_MIX_DEST_LIST_RCT(events, txs_blk_5,
m_miner_account,
build_dsts({{
m_miner_account,
false,
MK_COINS(1) >> 1}, {addr_alice_sub_0_2,
true,
MK_COINS(1) >> 1}, {addr_alice_sub_0_3,
true,
MK_COINS(1) >> 1}}), 10, blk_4);
804 MAKE_TX_MIX_DEST_LIST_RCT(events, txs_blk_5,
m_miner_account,
build_dsts({{
m_miner_account,
false,
MK_COINS(1) >> 1}, {addr_alice_sub_0_2,
true,
MK_COINS(1) >> 1}, {addr_alice_sub_0_3,
true,
MK_COINS(1) >> 1}}), 10, blk_4);
809 MAKE_TX_MIX_DEST_LIST_RCT(events, txs_blk_5,
m_miner_account,
build_dsts({{addr_alice_sub_1_0,
true,
MK_COINS(1) >> 1}, {addr_alice_sub_1_1,
true,
MK_COINS(1) >> 1}, {addr_alice_sub_0_3,
true,
MK_COINS(1) >> 1}}), 10, blk_4);
810 MAKE_TX_MIX_DEST_LIST_RCT(events, txs_blk_5,
m_miner_account,
build_dsts({{addr_alice_sub_1_1,
true,
MK_COINS(1) >> 1}, {addr_alice_sub_1_1,
true,
MK_COINS(1) >> 1}, {addr_alice_sub_0_2,
true,
MK_COINS(1) >> 1}}), 10, blk_4);
811 MAKE_TX_MIX_DEST_LIST_RCT(events, txs_blk_5,
m_miner_account,
build_dsts({{addr_alice_sub_1_2,
true,
MK_COINS(1) >> 1}, {addr_alice_sub_1_1,
true,
MK_COINS(1) >> 1}, {addr_alice_sub_0_5,
true,
MK_COINS(1) >> 1}}), 10, blk_4);
834 std::vector<size_t> selected_transfers;
835 std::vector<tx_source_entry> sources;
840 events.push_back(tx_1);
853 MDEBUG(
"Available funds on Alice: " << get_available_funds(
m_wl_alice.get()));
854 MDEBUG(
"Available funds on Bob: " << get_available_funds(
m_wl_bob.get()));
const config_t & get_config(network_type nettype)
#define CHECK_AND_ASSERT_THROW_MES(expr, message)
cryptonote::network_type m_network_type
static void set_account(tools::wallet2 *wallet, cryptonote::account_base &account)
void create_from_device(const std::string &device_name)
static const uint64_t m_wallet_ts
#define ADD_HARDFORK(HARDFORKS, FORK, HEIGHT)
bool m_live_refresh_enabled
#define MAKE_NEXT_BLOCK_TX_LIST_HF(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC, TXLIST, HF)
std::vector< cryptonote::tx_destination_entry > build_dsts(const var_addr_t &to1, bool sub1, uint64_t am1)
uint64_t num_blocks(const std::vector< test_event_entry > &events)
cryptonote::account_base m_alice_account
#define REWIND_BLOCKS_N(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC, COUNT)
crypto::secret_key generate(const crypto::secret_key &recovery_key=crypto::secret_key(), bool recover=false, bool two_random=false)
#define MAKE_TX_LIST(VEC_EVENTS, SET_NAME, FROM, TO, AMOUNT, HEAD)
#define REWIND_BLOCKS_HF(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC, HF)
#define TREZOR_ACCOUNT_ORDERING
cryptonote::account_base m_miner_account
std::unique_ptr< tools::wallet2 > m_wl_bob
bool construct_tx_to_key(const std::vector< test_event_entry > &events, cryptonote::transaction &tx, const cryptonote::block &blk_head, const cryptonote::account_base &from, const var_addr_t &to, uint64_t amount, uint64_t fee, size_t nmix, bool rct, rct::RangeProofType range_proof_type, int bp_version)
bool generate_genesis_block(block &bl, std::string const &genesis_tx, uint32_t nonce)
virtual void init_fields()
#define TREZOR_TEST_MIXIN
v_hardforks_t m_hard_forks
std::string const GENESIS_TX
unsigned __int64 uint64_t
void set_createtime(uint64_t val)
#define MAKE_TX_LIST_START(VEC_EVENTS, SET_NAME, FROM, TO, AMOUNT, HEAD)
hw::trezor::device_trezor * m_trezor
#define CRYPTONOTE_REWARD_BLOCKS_WINDOW
#define REWIND_BLOCKS(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC)
std::vector< test_event_entry > m_events
cryptonote::account_base m_bob_account
test_generator m_generator
#define MAKE_TX_MIX_DEST_LIST_RCT(VEC_EVENTS, SET_NAME, FROM, TO, NMIX, HEAD)
bool verRctNonSemanticsSimple(const rctSig &rv)
uint32_t const GENESIS_NONCE
virtual void setup_trezor()
crypto::hash get_block_hash(uint64_t height)
virtual void update_client_settings()
static const uint64_t m_ts_start
cryptonote::account_base m_eve_account
#define MAKE_TX_LIST_START_RCT(VEC_EVENTS, SET_NAME, FROM, TO, AMOUNT, NMIX, HEAD)
#define MAKE_TX_MIX_LIST_RCT(VEC_EVENTS, SET_NAME, FROM, TO, AMOUNT, NMIX, HEAD)
#define MAKE_NEXT_BLOCK_TX_LIST(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC, TXLIST)
std::unique_ptr< tools::wallet2 > m_wl_alice
bool verRctSemanticsSimple(const std::vector< const rctSig *> &rvv)
#define MAKE_NEXT_BLOCK_TX1_HF(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC, TX1, HF)
#define REWIND_BLOCKS_N_HF(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC, COUNT, HF)