From 08635a08755956be12c68ba40bcc96b8828ff2a9 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 12 Nov 2019 18:40:37 +0000 Subject: blockchain: speedup fetching pruned contiguous tx blobs About twice as fast, very roughly --- src/blockchain_db/blockchain_db.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/blockchain_db/blockchain_db.h') diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h index d1e4919be..21700d5d3 100644 --- a/src/blockchain_db/blockchain_db.h +++ b/src/blockchain_db/blockchain_db.h @@ -1252,6 +1252,22 @@ public: */ virtual bool get_pruned_tx_blob(const crypto::hash& h, cryptonote::blobdata &tx) const = 0; + /** + * @brief fetches a number of pruned transaction blob from the given hash, in canonical blockchain order + * + * The subclass should return the pruned transactions stored from the one with the given + * hash. + * + * If the first transaction does not exist, the subclass should return false. + * If the first transaction exists, but there are fewer transactions starting with it + * than requested, the subclass should return false. + * + * @param h the hash to look for + * + * @return true iff the transactions were found + */ + virtual bool get_pruned_tx_blobs_from(const crypto::hash& h, size_t count, std::vector &bd) const = 0; + /** * @brief fetches the prunable transaction blob with the given hash * -- cgit v1.2.3