aboutsummaryrefslogtreecommitdiff
path: root/tests/core_tests/rct.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-09-04 13:59:36 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-09-17 11:39:25 +0000
commita444f06e53b218cc8bd091e5283828beb3e7d9af (patch)
tree5adef894dd90fb764b8ea332604f43ceafd955b9 /tests/core_tests/rct.h
parentMerge pull request #5861 (diff)
downloadmonero-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.h14
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
+ };
+};