unit_tests: fix long term block weight test after cache change

This commit is contained in:
moneromooo-monero 2019-04-03 00:09:49 +00:00
parent 1ef3d05c4a
commit 7190798049
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 5 additions and 0 deletions

View File

@ -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;