diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-03-23 11:46:57 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-03-23 11:46:57 +0200 |
commit | a73a886cb16c42a57d10c93e50eb4f84d965c124 (patch) | |
tree | 0df8bbd20301d53613b07493940417c70ccf7c4e /src/cryptonote_basic/cryptonote_format_utils.h | |
parent | Merge pull request #1910 (diff) | |
parent | tx_pool: ensure txes loaded from poolstate.bin have their txid cached (diff) | |
download | monero-a73a886cb16c42a57d10c93e50eb4f84d965c124.tar.xz |
Merge pull request #1911
91d41090 tx_pool: ensure txes loaded from poolstate.bin have their txid cached (moneromooo-monero)
aaeb164c tx_pool: remove transactions if they're in the blockchain (moneromooo-monero)
558cfc31 core, wallet: faster tx pool scanning (moneromooo-monero)
f065234b core: cache tx and block hashes in the respective classes (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_basic/cryptonote_format_utils.h')
-rw-r--r-- | src/cryptonote_basic/cryptonote_format_utils.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cryptonote_basic/cryptonote_format_utils.h b/src/cryptonote_basic/cryptonote_format_utils.h index 7b09235b8..5c10907fd 100644 --- a/src/cryptonote_basic/cryptonote_format_utils.h +++ b/src/cryptonote_basic/cryptonote_format_utils.h @@ -85,7 +85,9 @@ namespace cryptonote bool get_transaction_hash(const transaction& t, crypto::hash& res); bool get_transaction_hash(const transaction& t, crypto::hash& res, size_t& blob_size); bool get_transaction_hash(const transaction& t, crypto::hash& res, size_t* blob_size); + bool calculate_transaction_hash(const transaction& t, crypto::hash& res, size_t* blob_size); blobdata get_block_hashing_blob(const block& b); + bool calculate_block_hash(const block& b, crypto::hash& res); bool get_block_hash(const block& b, crypto::hash& res); crypto::hash get_block_hash(const block& b); bool get_block_longhash(const block& b, crypto::hash& res, uint64_t height); @@ -209,6 +211,7 @@ namespace cryptonote crypto::hash get_tx_tree_hash(const std::vector<crypto::hash>& tx_hashes); crypto::hash get_tx_tree_hash(const block& b); bool is_valid_decomposed_amount(uint64_t amount); + void get_hash_stats(uint64_t &tx_hashes_calculated, uint64_t &tx_hashes_cached, uint64_t &block_hashes_calculated, uint64_t & block_hashes_cached); #define CHECKED_GET_SPECIFIC_VARIANT(variant_var, specific_type, variable_name, fail_return_val) \ CHECK_AND_ASSERT_MES(variant_var.type() == typeid(specific_type), fail_return_val, "wrong variant type: " << variant_var.type().name() << ", expected " << typeid(specific_type).name()); \ |