From b9389e582eb4e1806ce25a14fa492259c3d40dfc Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 1 Oct 2017 11:24:33 +0100 Subject: db_lmdb: save pruned and prunable tx data separately This bumps DB version to 2, migration code will run for v1 DBs --- src/cryptonote_core/blockchain.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/cryptonote_core/blockchain.h') diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h index f58885812..cb15925ff 100644 --- a/src/cryptonote_core/blockchain.h +++ b/src/cryptonote_core/blockchain.h @@ -415,11 +415,12 @@ namespace cryptonote * @param blocks return-by-reference the blocks and their transactions * @param total_height return-by-reference our current blockchain height * @param start_height return-by-reference the height of the first block returned + * @param pruned whether to return full or pruned tx blobs * @param max_count the max number of blocks to get * * @return true if a block found in common or req_start_block specified, else false */ - bool find_blockchain_supplement(const uint64_t req_start_block, const std::list& qblock_ids, std::list > >& blocks, uint64_t& total_height, uint64_t& start_height, size_t max_count) const; + bool find_blockchain_supplement(const uint64_t req_start_block, const std::list& qblock_ids, std::list > >& blocks, uint64_t& total_height, uint64_t& start_height, bool pruned, size_t max_count) const; /** * @brief retrieves a set of blocks and their transactions, and possibly other transactions @@ -679,11 +680,12 @@ namespace cryptonote * @param txs_ids a container of hashes for which to get the corresponding transactions * @param txs return-by-reference a container to store result transactions in * @param missed_txs return-by-reference a container to store missed transactions in + * @param pruned whether to return full or pruned blobs * * @return false if an unexpected exception occurs, else true */ template - bool get_transactions_blobs(const t_ids_container& txs_ids, t_tx_container& txs, t_missed_container& missed_txs) const; + bool get_transactions_blobs(const t_ids_container& txs_ids, t_tx_container& txs, t_missed_container& missed_txs, bool pruned = false) const; template bool get_transactions(const t_ids_container& txs_ids, t_tx_container& txs, t_missed_container& missed_txs) const; @@ -858,10 +860,11 @@ namespace cryptonote * @brief perform a check on all transactions in the blockchain * * @param std::function the check to perform, pass/fail + * @param bool pruned whether to return pruned txes only * * @return false if any transaction fails the check, otherwise true */ - bool for_all_transactions(std::function) const; + bool for_all_transactions(std::function, bool pruned) const; /** * @brief perform a check on all outputs in the blockchain -- cgit v1.2.3