diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-09-04 13:59:36 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-09-17 11:39:25 +0000 |
commit | a444f06e53b218cc8bd091e5283828beb3e7d9af (patch) | |
tree | 5adef894dd90fb764b8ea332604f43ceafd955b9 /tests/core_tests/rct.h | |
parent | Merge pull request #5861 (diff) | |
download | monero-a444f06e53b218cc8bd091e5283828beb3e7d9af.tar.xz |
blockchain: enforce 10 block age for spending outputs
Some custom wallet code apparently ignores this, which causes users
of that code to be fingerprinted
Diffstat (limited to 'tests/core_tests/rct.h')
-rw-r--r-- | tests/core_tests/rct.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/core_tests/rct.h b/tests/core_tests/rct.h index 00a2bd88c..9433d4b02 100644 --- a/tests/core_tests/rct.h +++ b/tests/core_tests/rct.h @@ -69,6 +69,10 @@ struct gen_rct_tx_validation_base : public test_chain_unit_base return true; } + bool generate_with_full(std::vector<test_event_entry>& events, const int *out_idx, int mixin, + uint64_t amount_paid, size_t second_rewind, uint8_t last_version, const rct::RCTConfig &rct_config, bool valid, + const std::function<void(std::vector<cryptonote::tx_source_entry> &sources, std::vector<cryptonote::tx_destination_entry> &destinations)> &pre_tx, + const std::function<void(cryptonote::transaction &tx)> &post_tx) const; bool generate_with(std::vector<test_event_entry>& events, const int *out_idx, int mixin, uint64_t amount_paid, bool valid, const std::function<void(std::vector<cryptonote::tx_source_entry> &sources, std::vector<cryptonote::tx_destination_entry> &destinations)> &pre_tx, @@ -262,3 +266,13 @@ struct gen_rct_tx_rct_altered_extra : public gen_rct_tx_validation_base }; template<> struct get_test_options<gen_rct_tx_rct_altered_extra>: public get_test_options<gen_rct_tx_validation_base> {}; +struct gen_rct_tx_uses_output_too_early : public gen_rct_tx_validation_base +{ + bool generate(std::vector<test_event_entry>& events) const; +}; +template<> struct get_test_options<gen_rct_tx_uses_output_too_early> { + const std::pair<uint8_t, uint64_t> hard_forks[5] = {std::make_pair(1, 0), std::make_pair(2, 1), std::make_pair(4, 65), std::make_pair(12, 69), std::make_pair(0, 0)}; + const cryptonote::test_options test_options = { + hard_forks, 0 + }; +}; |