39 template<
class concrete_test>
57 size_t m_invalid_tx_index;
58 size_t m_invalid_block_index;
62 template<
bool txs_keeped_by_block>
71 bool generate(std::vector<test_event_entry>& events)
const;
75 template<
bool txs_keeped_by_block>
84 bool generate(std::vector<test_event_entry>& events)
const;
88 template<
bool txs_keeped_by_block>
97 bool generate(std::vector<test_event_entry>& events)
const;
101 template<
bool txs_keeped_by_block>
110 bool generate(std::vector<test_event_entry>& events)
const;
114 template<
bool txs_keeped_by_block>
123 bool generate(std::vector<test_event_entry>& events)
const;
135 bool generate(std::vector<test_event_entry>& events)
const;
141 #define INIT_DOUBLE_SPEND_TEST() \ 142 uint64_t ts_start = 1338224400; \ 143 GENERATE_ACCOUNT(miner_account); \ 144 MAKE_GENESIS_BLOCK(events, blk_0, miner_account, ts_start); \ 145 MAKE_ACCOUNT(events, bob_account); \ 146 MAKE_ACCOUNT(events, alice_account); \ 147 REWIND_BLOCKS(events, blk_0r, blk_0, miner_account); \ 148 MAKE_TX(events, tx_0, miner_account, bob_account, send_amount, blk_0); \ 149 MAKE_NEXT_BLOCK_TX1(events, blk_1, blk_0r, miner_account, tx_0); \ 150 REWIND_BLOCKS(events, blk_1r, blk_1, miner_account); 153 #include "double_spend.inl" #define CRYPTONOTE_MINED_ETN_UNLOCK_WINDOW
static const bool has_invalid_tx
static const uint64_t expected_alice_balance
static const bool has_invalid_tx
static const uint64_t send_amount
static const size_t expected_pool_txs_count
static const uint64_t expected_bob_balance
bool mark_invalid_tx(cryptonote::core &c, size_t ev_index, const std::vector< test_event_entry > &events)
static const uint64_t expected_bob_balance
static const uint64_t expected_alice_balance
static const uint64_t send_amount
bool generate(std::vector< test_event_entry > &events) const
static const uint64_t send_amount
#define TESTS_DEFAULT_FEE
bool check_double_spend(cryptonote::core &c, size_t ev_index, const std::vector< test_event_entry > &events)
static const size_t expected_pool_txs_count
const uint64_t FIRST_BLOCK_REWARD
bool generate(std::vector< test_event_entry > &events) const
static const uint64_t expected_alice_balance
static const size_t expected_pool_txs_count
static const uint64_t send_amount
gen_double_spend_in_different_chains()
static const size_t expected_pool_txs_count
static const size_t expected_blockchain_height
static const uint64_t expected_bob_balance
static const bool has_invalid_tx
bool mark_invalid_block(cryptonote::core &c, size_t ev_index, const std::vector< test_event_entry > &events)
static const uint64_t expected_bob_balance
handles core cryptonote functionality
unsigned __int64 uint64_t
bool generate(std::vector< test_event_entry > &events) const
static const uint64_t send_amount
bool generate(std::vector< test_event_entry > &events) const
static const uint64_t expected_alice_balance
static const uint64_t send_amount
static const uint64_t expected_bob_balance
const size_t invalid_index_value
bool check_block_verification_context(const cryptonote::block_verification_context &bvc, size_t event_idx, const cryptonote::block &block)
bool mark_last_valid_block(cryptonote::core &c, size_t ev_index, const std::vector< test_event_entry > &events)
static const bool has_invalid_tx
static const uint64_t expected_alice_balance
bool generate(std::vector< test_event_entry > &events) const
bool generate(std::vector< test_event_entry > &events) const
static const bool has_invalid_tx
static const uint64_t send_amount
bool check_tx_verification_context(const cryptonote::tx_verification_context &tvc, bool tx_added, size_t event_idx, const cryptonote::transaction &tx)
bool check_double_spend(cryptonote::core &c, size_t ev_index, const std::vector< test_event_entry > &events)
static const size_t expected_pool_txs_count