diff options
-rw-r--r-- | contrib/epee/include/span.h | 1 | ||||
-rw-r--r-- | tests/unit_tests/long_term_block_weight.cpp | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/contrib/epee/include/span.h b/contrib/epee/include/span.h index 19720ea8b..e100452ca 100644 --- a/contrib/epee/include/span.h +++ b/contrib/epee/include/span.h @@ -31,6 +31,7 @@ #include <algorithm> #include <cstdint> #include <memory> +#include <string> #include <type_traits> namespace epee 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; |