aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/testdb.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-20 20:19:39 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-05 11:58:05 +0000
commit79b4e9f3779796d9233e3e169f5c1086a49717dd (patch)
tree6ca8ebd03038cb703ffc89cab72482ce9e31a271 /src/blockchain_db/testdb.h
parentblockchain: avoid pointless transaction copy and temporary (diff)
downloadmonero-79b4e9f3779796d9233e3e169f5c1086a49717dd.tar.xz
save some database calls when getting top block hash and height
Diffstat (limited to '')
-rw-r--r--src/blockchain_db/testdb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/blockchain_db/testdb.h b/src/blockchain_db/testdb.h
index dcaee79b7..ac1849b5f 100644
--- a/src/blockchain_db/testdb.h
+++ b/src/blockchain_db/testdb.h
@@ -79,7 +79,7 @@ public:
virtual crypto::hash get_block_hash_from_height(const uint64_t& height) const { return crypto::hash(); }
virtual std::vector<cryptonote::block> get_blocks_range(const uint64_t& h1, const uint64_t& h2) const { return std::vector<cryptonote::block>(); }
virtual std::vector<crypto::hash> get_hashes_range(const uint64_t& h1, const uint64_t& h2) const { return std::vector<crypto::hash>(); }
- virtual crypto::hash top_block_hash() const { return crypto::hash(); }
+ virtual crypto::hash top_block_hash(uint64_t *block_height = NULL) const { if (block_height) *block_height = 0; return crypto::hash(); }
virtual cryptonote::block get_top_block() const { return cryptonote::block(); }
virtual uint64_t height() const { return 1; }
virtual bool tx_exists(const crypto::hash& h) const { return false; }