aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain_db.h
diff options
context:
space:
mode:
authorwarptangent <warptangent@inbox.com>2015-02-11 15:55:53 -0800
committerwarptangent <warptangent@inbox.com>2015-02-23 00:33:37 -0800
commit8909d7d82eaf2b130b7d36fb5db7863170356b15 (patch)
treeb33f9b7f9f874e040208d2074c9797861b929281 /src/cryptonote_core/blockchain_db.h
parentAdd profiling to block and tx processing (diff)
downloadmonero-8909d7d82eaf2b130b7d36fb5db7863170356b15.tar.xz
Improve block and tx processing efficiency by less repeat hashing
BlockchainLMDB::add_block() BlockchainLMDB::add_transaction_data() BlockchainDB::add_transaction()
Diffstat (limited to 'src/cryptonote_core/blockchain_db.h')
-rw-r--r--src/cryptonote_core/blockchain_db.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cryptonote_core/blockchain_db.h b/src/cryptonote_core/blockchain_db.h
index 531de04bd..02620c406 100644
--- a/src/cryptonote_core/blockchain_db.h
+++ b/src/cryptonote_core/blockchain_db.h
@@ -265,13 +265,14 @@ private:
, const size_t& block_size
, const difficulty_type& cumulative_difficulty
, const uint64_t& coins_generated
+ , const crypto::hash& blk_hash
) = 0;
// tells the subclass to remove data about the top block
virtual void remove_block() = 0;
// tells the subclass to store the transaction and its metadata
- virtual void add_transaction_data(const crypto::hash& blk_hash, const transaction& tx) = 0;
+ virtual void add_transaction_data(const crypto::hash& blk_hash, const transaction& tx, const crypto::hash& tx_hash) = 0;
// tells the subclass to remove data about a transaction
virtual void remove_transaction_data(const crypto::hash& tx_hash, const transaction& tx) = 0;
@@ -296,7 +297,7 @@ private:
void pop_block();
// helper function for add_transactions, to add each individual tx
- void add_transaction(const crypto::hash& blk_hash, const transaction& tx);
+ void add_transaction(const crypto::hash& blk_hash, const transaction& tx, const crypto::hash* tx_hash_ptr = NULL);
// helper function to remove transaction from blockchain
void remove_transaction(const crypto::hash& tx_hash);