38template<
class concrete_test>
61template<
bool txs_keeped_by_block>
70 bool generate(std::vector<test_event_entry>& events)
const;
74template<
bool txs_keeped_by_block>
83 bool generate(std::vector<test_event_entry>& events)
const;
87template<
bool txs_keeped_by_block>
96 bool generate(std::vector<test_event_entry>& events)
const;
100template<
bool txs_keeped_by_block>
109 bool generate(std::vector<test_event_entry>& events)
const;
113template<
bool txs_keeped_by_block>
122 bool generate(std::vector<test_event_entry>& events)
const;
134 bool generate(std::vector<test_event_entry>& events)
const;
140#define INIT_DOUBLE_SPEND_TEST() \
141 uint64_t ts_start = 1338224400; \
142 GENERATE_ACCOUNT(miner_account); \
143 MAKE_GENESIS_BLOCK(events, blk_0, miner_account, ts_start); \
144 MAKE_ACCOUNT(events, bob_account); \
145 MAKE_ACCOUNT(events, alice_account); \
146 REWIND_BLOCKS(events, blk_0r, blk_0, miner_account); \
147 MAKE_TX(events, tx_0, miner_account, bob_account, send_amount, blk_0); \
148 MAKE_NEXT_BLOCK_TX1(events, blk_1, blk_0r, miner_account, tx_0); \
149 REWIND_BLOCKS(events, blk_1r, blk_1, miner_account);
#define TESTS_DEFAULT_FEE
Definition chaingen.h:1092
handles core cryptonote functionality
Definition cryptonote_core.h:87
Definition cryptonote_basic.h:205
static const uint64_t send_amount
Definition double_spend.h:42
bool mark_invalid_block(cryptonote::core &c, size_t ev_index, const std::vector< test_event_entry > &events)
Definition double_spend.inl:82
cryptonote::block m_last_valid_block
Definition double_spend.h:55
size_t m_invalid_block_index
Definition double_spend.h:57
bool mark_invalid_tx(cryptonote::core &c, size_t ev_index, const std::vector< test_event_entry > &events)
Definition double_spend.inl:75
bool check_double_spend(cryptonote::core &c, size_t ev_index, const std::vector< test_event_entry > &events)
Definition double_spend.inl:89
bool check_block_verification_context(const cryptonote::block_verification_context &bvc, size_t event_idx, const cryptonote::block &block)
Definition double_spend.inl:56
gen_double_spend_base()
Definition double_spend.inl:36
bool check_tx_verification_context(const cryptonote::tx_verification_context &tvc, bool tx_added, size_t event_idx, const cryptonote::transaction &tx)
Definition double_spend.inl:47
bool mark_last_valid_block(cryptonote::core &c, size_t ev_index, const std::vector< test_event_entry > &events)
Definition double_spend.inl:65
size_t m_invalid_tx_index
Definition double_spend.h:56
static const size_t expected_blockchain_height
Definition double_spend.h:130
gen_double_spend_in_different_chains()
Definition double_spend.cpp:40
static const uint64_t send_amount
Definition double_spend.h:129
bool check_double_spend(cryptonote::core &c, size_t ev_index, const std::vector< test_event_entry > &events)
Definition double_spend.cpp:72
bool generate(std::vector< test_event_entry > &events) const
Definition double_spend.cpp:45
Definition chaingen.h:166
#define CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW
Definition cryptonote_config.h:44
const size_t invalid_index_value
Definition double_spend.h:34
const uint64_t FIRST_BLOCK_REWARD
Definition double_spend.h:35
unsigned __int64 uint64_t
Definition stdint.h:136
Definition verification_context.h:66
Definition cryptonote_basic.h:475
Definition verification_context.h:41
Definition double_spend.h:115
bool generate(std::vector< test_event_entry > &events) const
Definition double_spend.inl:254
static const size_t expected_pool_txs_count
Definition double_spend.h:118
static const uint64_t expected_alice_balance
Definition double_spend.h:120
static const uint64_t send_amount
Definition double_spend.h:116
static const uint64_t expected_bob_balance
Definition double_spend.h:119
static const bool has_invalid_tx
Definition double_spend.h:117
Definition double_spend.h:102
static const size_t expected_pool_txs_count
Definition double_spend.h:105
static const uint64_t expected_alice_balance
Definition double_spend.h:107
static const bool has_invalid_tx
Definition double_spend.h:104
static const uint64_t expected_bob_balance
Definition double_spend.h:106
static const uint64_t send_amount
Definition double_spend.h:103
bool generate(std::vector< test_event_entry > &events) const
Definition double_spend.inl:219
Definition double_spend.h:89
static const size_t expected_pool_txs_count
Definition double_spend.h:92
static const uint64_t expected_bob_balance
Definition double_spend.h:93
bool generate(std::vector< test_event_entry > &events) const
Definition double_spend.inl:188
static const uint64_t send_amount
Definition double_spend.h:90
static const bool has_invalid_tx
Definition double_spend.h:91
static const uint64_t expected_alice_balance
Definition double_spend.h:94
Definition double_spend.h:76
static const bool has_invalid_tx
Definition double_spend.h:78
static const uint64_t expected_bob_balance
Definition double_spend.h:80
static const uint64_t expected_alice_balance
Definition double_spend.h:81
static const size_t expected_pool_txs_count
Definition double_spend.h:79
bool generate(std::vector< test_event_entry > &events) const
Definition double_spend.inl:161
static const uint64_t send_amount
Definition double_spend.h:77
Definition double_spend.h:63
static const uint64_t send_amount
Definition double_spend.h:64
static const uint64_t expected_bob_balance
Definition double_spend.h:67
bool generate(std::vector< test_event_entry > &events) const
Definition double_spend.inl:123
static const uint64_t expected_alice_balance
Definition double_spend.h:68
static const size_t expected_pool_txs_count
Definition double_spend.h:66
static const bool has_invalid_tx
Definition double_spend.h:65
cryptonote::transaction tx
Definition transaction.cpp:40