43 uint64_t amount_2 = total_amount - amount_1;
46 miner_tx.
vout.clear();
51 miner_tx.
vout.push_back(out1);
56 miner_tx.
vout.push_back(out2);
59 void append_tx_source_entry(std::vector<cryptonote::tx_source_entry>& sources,
const transaction& tx,
size_t out_idx)
70 sources.push_back(se);
77 : m_last_valid_block_event_idx(static_cast<size_t>(-1))
94 m_last_valid_block_event_idx = ev_index - 1;
116 events.push_back(blk_1);
124 events.push_back(blk_2);
133 std::list<cryptonote::transaction> txs_1;
156 std::vector<cryptonote::tx_source_entry> sources;
157 for (
size_t i = 0; i < blk_0.miner_tx.vout.size(); ++i)
161 append_tx_source_entry(sources, blk_0.miner_tx, i);
170 std::vector<cryptonote::tx_destination_entry> destinations;
178 if (!
construct_tx(miner_account.get_keys(), sources, destinations, boost::none, std::vector<uint8_t>(), tx_1, 0))
180 events.push_back(tx_1);
187 for (
size_t i = 0; i < tx_1.
vout.size(); ++i)
189 auto& tx_1_out = tx_1.
vout[i];
193 append_tx_source_entry(sources, tx_1, i);
196 destinations.clear();
198 de.
addr = alice_account.get_keys().m_account_address;
200 destinations.push_back(de);
201 destinations.push_back(de);
204 if (!
construct_tx(bob_account.get_keys(), sources, destinations, boost::none, std::vector<uint8_t>(), tx_2, 0))
206 events.push_back(tx_2);
#define MAKE_NEXT_BLOCK_TX1(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC, TX1)
crypto::public_key real_out_tx_key
uint64_t get_outs_etn_amount(const transaction &tx)
bool m_verification_failed
bool check_tx_verification_context(const cryptonote::tx_verification_context &tvc, bool tx_added, size_t event_idx, const cryptonote::transaction &tx)
bool construct_tx(const account_keys &sender_account_keys, std::vector< tx_source_entry > &sources, const std::vector< tx_destination_entry > &destinations, const boost::optional< cryptonote::account_public_address > &change_addr, const std::vector< uint8_t > &extra, transaction &tx, uint64_t unlock_time)
boost::variant< txout_to_script, txout_to_scripthash, txout_to_key, txout_to_key_public > txout_target_v
bool generate(std::vector< test_event_entry > &events) const
#define TESTS_DEFAULT_FEE
#define MAKE_TX_LIST(VEC_EVENTS, SET_NAME, FROM, TO, AMOUNT, HEAD)
transaction construct_tx_with_fee(std::vector< test_event_entry > &events, const block &blk_head, const account_base &acc_from, const var_addr_t &to, uint64_t amount, uint64_t fee)
bool m_marked_as_orphaned
std::vector< tx_out > vout
Holds cryptonote related classes and helpers.
bool mark_last_valid_block(cryptonote::core &c, size_t ev_index, const std::vector< test_event_entry > &events)
handles core cryptonote functionality
#define MAKE_GENESIS_BLOCK(VEC_EVENTS, BLK_NAME, MINER_ACC, TS)
unsigned __int64 uint64_t
bool check_block_verification_context(const cryptonote::block_verification_context &bvc, size_t event_idx, const cryptonote::block &block)
crypto::public_key get_tx_pub_key_from_extra(const std::vector< uint8_t > &tx_extra, size_t pk_index)
#define MAKE_MINER_TX_MANUALLY(TX, BLK)
bool generate(std::vector< test_event_entry > &events) const
#define MAKE_TX_LIST_START(VEC_EVENTS, SET_NAME, FROM, TO, AMOUNT, HEAD)
#define REGISTER_CALLBACK_METHOD(CLASS, METHOD)
void push_output(uint64_t idx, const crypto::public_key &k, uint64_t amount)
account_public_address addr
#define MAKE_ACCOUNT(VEC_EVENTS, account)
#define REWIND_BLOCKS(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC)
std::vector< crypto::public_key > real_out_additional_tx_keys
size_t real_output_in_tx_index
std::vector< crypto::public_key > get_additional_tx_pub_keys_from_extra(const std::vector< uint8_t > &tx_extra)
#define GENERATE_ACCOUNT(account)
#define DO_CALLBACK(VEC_EVENTS, CB_NAME)
#define MAKE_NEXT_BLOCK_TX_LIST(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC, TXLIST)
bool m_verification_failed