diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-04-03 00:09:49 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-04-03 00:10:48 +0000 |
| commit | 719079804984428d5da56eca4780b827f48a2e83 (patch) | |
| tree | 1ec2136eb1acca2fe1ef4fd26c5a83a6a4366c3b | |
| parent | 1ef3d05c4a753166482877d8434ad49a1c38155e (diff) | |
| download | monzero-core-719079804984428d5da56eca4780b827f48a2e83.tar.gz monzero-core-719079804984428d5da56eca4780b827f48a2e83.tar.xz monzero-core-719079804984428d5da56eca4780b827f48a2e83.zip | |
unit_tests: fix long term block weight test after cache change
| -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; |
