diff options
author | Martijn Otto <git@martijnotto.nl> | 2019-07-02 17:18:53 +0200 |
---|---|---|
committer | Martijn Otto <git@martijnotto.nl> | 2019-07-03 14:39:52 +0200 |
commit | c164f9037ec1d6660c17f737831a9eea29a19cf8 (patch) | |
tree | b9d39799bccbbc8cf36b775ed602addfa9ac90dc /src/cryptonote_core/blockchain.h | |
parent | Merge pull request #5681 (diff) | |
download | monero-c164f9037ec1d6660c17f737831a9eea29a19cf8.tar.xz |
Remove unnecessary m_check_txin_table, fix const correctness
Diffstat (limited to 'src/cryptonote_core/blockchain.h')
-rw-r--r-- | src/cryptonote_core/blockchain.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h index 32ed96b5b..a1ceaf984 100644 --- a/src/cryptonote_core/blockchain.h +++ b/src/cryptonote_core/blockchain.h @@ -559,7 +559,7 @@ namespace cryptonote * * @return false if any input is invalid, otherwise true */ - bool check_tx_inputs(transaction& tx, uint64_t& pmax_used_block_height, crypto::hash& max_used_block_id, tx_verification_context &tvc, bool kept_by_block = false); + bool check_tx_inputs(transaction& tx, uint64_t& pmax_used_block_height, crypto::hash& max_used_block_id, tx_verification_context &tvc, bool kept_by_block = false) const; /** * @brief get fee quantization mask @@ -626,7 +626,7 @@ namespace cryptonote * * @return false if any outputs do not conform, otherwise true */ - bool check_tx_outputs(const transaction& tx, tx_verification_context &tvc); + bool check_tx_outputs(const transaction& tx, tx_verification_context &tvc) const; /** * @brief gets the block weight limit based on recent blocks @@ -1040,7 +1040,6 @@ namespace cryptonote // metadata containers std::unordered_map<crypto::hash, std::unordered_map<crypto::key_image, std::vector<output_data_t>>> m_scan_table; std::unordered_map<crypto::hash, crypto::hash> m_blocks_longhash_table; - std::unordered_map<crypto::hash, std::unordered_map<crypto::key_image, bool>> m_check_txin_table; // SHA-3 hashes for each block and for fast pow checking std::vector<crypto::hash> m_blocks_hash_of_hashes; @@ -1150,7 +1149,7 @@ namespace cryptonote * * @return false if any output is not yet unlocked, or is missing, otherwise true */ - bool check_tx_input(size_t tx_version,const txin_to_key& txin, const crypto::hash& tx_prefix_hash, const std::vector<crypto::signature>& sig, const rct::rctSig &rct_signatures, std::vector<rct::ctkey> &output_keys, uint64_t* pmax_related_block_height); + bool check_tx_input(size_t tx_version,const txin_to_key& txin, const crypto::hash& tx_prefix_hash, const std::vector<crypto::signature>& sig, const rct::rctSig &rct_signatures, std::vector<rct::ctkey> &output_keys, uint64_t* pmax_related_block_height) const; /** * @brief validate a transaction's inputs and their keys @@ -1172,7 +1171,7 @@ namespace cryptonote * * @return false if any validation step fails, otherwise true */ - bool check_tx_inputs(transaction& tx, tx_verification_context &tvc, uint64_t* pmax_used_block_height = NULL); + bool check_tx_inputs(transaction& tx, tx_verification_context &tvc, uint64_t* pmax_used_block_height = NULL) const; /** * @brief performs a blockchain reorganization according to the longest chain rule @@ -1452,7 +1451,7 @@ namespace cryptonote * @param result false if the ring signature is invalid, otherwise true */ void check_ring_signature(const crypto::hash &tx_prefix_hash, const crypto::key_image &key_image, - const std::vector<rct::ctkey> &pubkeys, const std::vector<crypto::signature> &sig, uint64_t &result); + const std::vector<rct::ctkey> &pubkeys, const std::vector<crypto::signature> &sig, uint64_t &result) const; /** * @brief loads block hashes from compiled-in data set @@ -1472,7 +1471,7 @@ namespace cryptonote * can be reconstituted by the receiver. This function expands * that implicit data. */ - bool expand_transaction_2(transaction &tx, const crypto::hash &tx_prefix_hash, const std::vector<std::vector<rct::ctkey>> &pubkeys); + bool expand_transaction_2(transaction &tx, const crypto::hash &tx_prefix_hash, const std::vector<std::vector<rct::ctkey>> &pubkeys) const; /** * @brief invalidates any cached block template |