aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-04-01 17:34:02 +0200
committerRiccardo Spagni <ric@spagni.net>2019-04-01 17:34:02 +0200
commit29e4e70f3069ab79944b5128c79823d2e6a52309 (patch)
tree431cd0e235f55b201ce2bf7851d2d95573f7ff7a /tests
parentMerge pull request #5331 (diff)
parentblockchain: incremental long term block weight cache (diff)
downloadmonero-29e4e70f3069ab79944b5128c79823d2e6a52309.tar.xz
Merge pull request #5352
ae6885f6 blockchain: incremental long term block weight cache (moneromooo-monero) 9b687c78 blockchain: simple cache for the long term block weights (moneromooo-monero)
Diffstat (limited to 'tests')
-rw-r--r--tests/block_weight/block_weight.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/block_weight/block_weight.cpp b/tests/block_weight/block_weight.cpp
index 1e8974b78..7b3fdfe57 100644
--- a/tests/block_weight/block_weight.cpp
+++ b/tests/block_weight/block_weight.cpp
@@ -84,6 +84,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;