145{
147
154
155
156 std::vector<cryptonote::tx_source_entry> sources;
157 for (size_t i = 0; i < blk_0.miner_tx.vout.size(); ++i)
158 {
160 {
161 append_tx_source_entry(sources, blk_0.miner_tx, i);
162 break;
163 }
164 }
165 if (sources.empty())
166 {
167 return false;
168 }
169
170 std::vector<cryptonote::tx_destination_entry> destinations;
171 const account_public_address& bob_addr = bob_account.get_keys().m_account_address;
172 destinations.push_back(tx_destination_entry(
ETN_SUPPLY, bob_addr,
false));
173 destinations.push_back(tx_destination_entry(
ETN_SUPPLY - 1, bob_addr,
false));
174
176
177 cryptonote::transaction tx_1;
178 if (!
construct_tx(miner_account.get_keys(), sources, destinations, boost::none, std::vector<uint8_t>(), tx_1, 0))
179 return false;
180 events.push_back(tx_1);
181
184
185
186 sources.clear();
187 for (
size_t i = 0; i < tx_1.
vout.size(); ++i)
188 {
189 auto& tx_1_out = tx_1.
vout[i];
191 continue;
192
193 append_tx_source_entry(sources, tx_1, i);
194 }
195
196 destinations.clear();
197 cryptonote::tx_destination_entry de;
198 de.
addr = alice_account.get_keys().m_account_address;
200 destinations.push_back(de);
201 destinations.push_back(de);
202
203 cryptonote::transaction tx_2;
204 if (!
construct_tx(bob_account.get_keys(), sources, destinations, boost::none, std::vector<uint8_t>(), tx_2, 0))
205 return false;
206 events.push_back(tx_2);
207
209
210 return true;
211}
#define REWIND_BLOCKS(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC)
#define MAKE_GENESIS_BLOCK(VEC_EVENTS, BLK_NAME, MINER_ACC, TS)
#define DO_CALLBACK(VEC_EVENTS, CB_NAME)
#define TESTS_DEFAULT_FEE
#define MAKE_ACCOUNT(VEC_EVENTS, account)
#define GENERATE_ACCOUNT(account)
#define MAKE_NEXT_BLOCK_TX1(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC, TX1)
std::vector< tx_out > vout
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)
unsigned __int64 uint64_t
account_public_address addr