diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-11-20 20:19:39 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-03-05 11:58:05 +0000 |
commit | 79b4e9f3779796d9233e3e169f5c1086a49717dd (patch) | |
tree | 6ca8ebd03038cb703ffc89cab72482ce9e31a271 /src/blockchain_db/blockchain_db.h | |
parent | blockchain: avoid pointless transaction copy and temporary (diff) | |
download | monero-79b4e9f3779796d9233e3e169f5c1086a49717dd.tar.xz |
save some database calls when getting top block hash and height
Diffstat (limited to 'src/blockchain_db/blockchain_db.h')
-rw-r--r-- | src/blockchain_db/blockchain_db.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h index 4d0b8935f..ed13de5b5 100644 --- a/src/blockchain_db/blockchain_db.h +++ b/src/blockchain_db/blockchain_db.h @@ -1052,9 +1052,11 @@ public: * * The subclass should return the hash of the most recent block * + * @param block_height if non NULL, returns the height of that block (ie, the blockchain height minus 1) + * * @return the top block's hash */ - virtual crypto::hash top_block_hash() const = 0; + virtual crypto::hash top_block_hash(uint64_t *block_height = NULL) const = 0; /** * @brief fetch the top block |