aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/blockchain_db.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/blockchain_db/blockchain_db.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h
index e9fc85803..d3a218365 100644
--- a/src/blockchain_db/blockchain_db.h
+++ b/src/blockchain_db/blockchain_db.h
@@ -1291,6 +1291,25 @@ public:
virtual bool get_pruned_tx_blobs_from(const crypto::hash& h, size_t count, std::vector<cryptonote::blobdata> &bd) const = 0;
/**
+ * @brief fetches a variable number of blocks and transactions from the given height, in canonical blockchain order
+ *
+ * The subclass should return the blocks and transactions stored from the one with the given
+ * height. The number of blocks returned is variable, based on the max_size passed.
+ *
+ * @param start_height the height of the first block
+ * @param min_count the minimum number of blocks to return, if they exist
+ * @param max_count the maximum number of blocks to return
+ * @param max_size the maximum size of block/transaction data to return (will be exceeded by one blocks's worth at most, if min_count is met)
+ * @param blocks the returned block/transaction data
+ * @param pruned whether to return full or pruned tx data
+ * @param skip_coinbase whether to return or skip coinbase transactions (they're in blocks regardless)
+ * @param get_miner_tx_hash whether to calculate and return the miner (coinbase) tx hash
+ *
+ * @return true iff the blocks and transactions were found
+ */
+ virtual bool get_blocks_from(uint64_t start_height, size_t min_count, size_t max_count, size_t max_size, std::vector<std::pair<std::pair<cryptonote::blobdata, crypto::hash>, std::vector<std::pair<crypto::hash, cryptonote::blobdata>>>>& blocks, bool pruned, bool skip_coinbase, bool get_miner_tx_hash) const = 0;
+
+ /**
* @brief fetches the prunable transaction blob with the given hash
*
* The subclass should return the prunable transaction stored which has the given