aboutsummaryrefslogtreecommitdiff
path: root/tests/core_tests/block_validation.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-05-24 22:41:39 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-08-19 16:43:52 +0000
commit26072f1393f869b08ba279a3fb5b5e319d90b2ca (patch)
tree04d8f7af271039bee7741d66dde0d303fda3e448 /tests/core_tests/block_validation.h
parentMerge pull request #5685 (diff)
downloadmonero-26072f1393f869b08ba279a3fb5b5e319d90b2ca.tar.xz
blockchain: forbid v1 coinbase from v12
Diffstat (limited to 'tests/core_tests/block_validation.h')
-rw-r--r--tests/core_tests/block_validation.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/core_tests/block_validation.h b/tests/core_tests/block_validation.h
index 4a65b029e..2393e1b01 100644
--- a/tests/core_tests/block_validation.h
+++ b/tests/core_tests/block_validation.h
@@ -206,3 +206,15 @@ struct gen_block_invalid_binary_format : public test_chain_unit_base
private:
size_t m_corrupt_blocks_begin_idx;
};
+
+struct gen_block_late_v1_coinbase_tx : public gen_block_verification_base<1>
+{
+ bool generate(std::vector<test_event_entry>& events) const;
+};
+template<>
+struct get_test_options<gen_block_late_v1_coinbase_tx> {
+ const std::pair<uint8_t, uint64_t> hard_forks[3] = {std::make_pair(1, 0), std::make_pair(HF_VERSION_MIN_V2_COINBASE_TX, 1), std::make_pair(0, 0)};
+ const cryptonote::test_options test_options = {
+ hard_forks, 0
+ };
+};