575{
576 static const size_t tests_count = 6;
577
579
584
585 std::array<account_base, tests_count> accounts;
586 for (size_t i = 0; i < tests_count; ++i)
587 {
589 accounts[i] = acc;
590 }
591
592 std::list<transaction> txs_0;
593 auto make_tx_to_acc = [&](
size_t acc_idx,
uint64_t unlock_time)
594 {
595 txs_0.push_back(make_simple_tx_with_unlock_time(events, blk_1, miner_account, accounts[acc_idx],
597 events.push_back(txs_0.back());
598 };
599
601 make_tx_to_acc(0, 0);
602 make_tx_to_acc(1, blk_3_height - 1);
603 make_tx_to_acc(2, blk_3_height);
604 make_tx_to_acc(3, blk_3_height + 1);
605 make_tx_to_acc(4,
time(0) - 1);
606 make_tx_to_acc(5,
time(0) + 60 * 60);
608
609 std::list<transaction> txs_1;
610 auto make_tx_from_acc = [&](
size_t acc_idx,
bool invalid)
611 {
612 transaction tx = make_simple_tx_with_unlock_time(events, blk_2, accounts[acc_idx], miner_account,
MK_COINS(1), 0);
613 if (invalid)
614 {
616 }
617 else
618 {
619 txs_1.push_back(tx);
620 }
621 events.push_back(tx);
622 };
623
624 make_tx_from_acc(0, false);
625 make_tx_from_acc(1, false);
626 make_tx_from_acc(2, false);
627 make_tx_from_acc(3, true);
628 make_tx_from_acc(4, false);
629 make_tx_from_acc(5, true);
631
632 return true;
633}
#define REWIND_BLOCKS(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC)
#define MAKE_GENESIS_BLOCK(VEC_EVENTS, BLK_NAME, MINER_ACC, TS)
#define MAKE_NEXT_BLOCK_TX_LIST(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC, TXLIST)
#define DO_CALLBACK(VEC_EVENTS, CB_NAME)
#define REWIND_BLOCKS_N(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC, COUNT)
#define TESTS_DEFAULT_FEE
#define MAKE_ACCOUNT(VEC_EVENTS, account)
#define GENERATE_ACCOUNT(account)
uint64_t get_block_height(const block &b)
unsigned __int64 uint64_t