diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-05-16 22:41:50 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-05-21 19:51:58 +0100 |
commit | 5f8ffca34d87e46b7a44964e61733bfe5a85c028 (patch) | |
tree | 0236964fb6c1b7116e81ce9686e661d264a620d6 /tests/unit_tests | |
parent | Merge pull request #3830 (diff) | |
download | monero-5f8ffca34d87e46b7a44964e61733bfe5a85c028.tar.xz |
speed up get_output_distribution (and precalc common case)
Diffstat (limited to 'tests/unit_tests')
-rw-r--r-- | tests/unit_tests/hardfork.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/unit_tests/hardfork.cpp b/tests/unit_tests/hardfork.cpp index 3e2199217..c42180c47 100644 --- a/tests/unit_tests/hardfork.cpp +++ b/tests/unit_tests/hardfork.cpp @@ -113,6 +113,7 @@ public: virtual bool for_all_outputs(uint64_t amount, const std::function<bool(uint64_t height)> &f) const { return true; } virtual bool is_read_only() const { return false; } virtual std::map<uint64_t, std::tuple<uint64_t, uint64_t, uint64_t>> get_output_histogram(const std::vector<uint64_t> &amounts, bool unlocked, uint64_t recent_cutoff) const { return std::map<uint64_t, std::tuple<uint64_t, uint64_t, uint64_t>>(); } + virtual bool get_output_distribution(uint64_t amount, uint64_t from_height, uint64_t to_height, std::vector<uint64_t> &distribution, uint64_t &base) const { return false; } virtual void add_txpool_tx(const transaction &tx, const txpool_tx_meta_t& details) {} virtual void update_txpool_tx(const crypto::hash &txid, const txpool_tx_meta_t& details) {} |