diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-04-06 16:04:27 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-04-06 16:04:27 +0200 |
commit | c34930c2070e50b19a347e66b8ece62839d39a36 (patch) | |
tree | 0c83740e41faa48b6c9c80e6ea2dd0170fcdd45c | |
parent | Merge pull request #5375 (diff) | |
parent | unit_tests: fix long term block weight test after cache change (diff) | |
download | monero-c34930c2070e50b19a347e66b8ece62839d39a36.tar.xz |
Merge pull request #5391
71907980 unit_tests: fix long term block weight test after cache change (moneromooo-monero)
Diffstat (limited to '')
-rw-r--r-- | tests/unit_tests/long_term_block_weight.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit_tests/long_term_block_weight.cpp b/tests/unit_tests/long_term_block_weight.cpp index ce6ff3551..bf1368618 100644 --- a/tests/unit_tests/long_term_block_weight.cpp +++ b/tests/unit_tests/long_term_block_weight.cpp @@ -76,6 +76,11 @@ public: while (count-- && start_height < blocks.size()) ret.push_back(blocks[start_height++].long_term_weight); return ret; } + virtual crypto::hash get_block_hash_from_height(const uint64_t &height) const override { + crypto::hash hash = crypto::null_hash; + *(uint64_t*)&hash = height; + return hash; + } virtual crypto::hash top_block_hash(uint64_t *block_height = NULL) const override { uint64_t h = height(); crypto::hash top = crypto::null_hash; |