diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2022-04-19 22:14:03 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2022-04-19 22:14:03 -0500 |
| commit | 96758a7d05bb1747951ffac87a307d592f882655 (patch) | |
| tree | 20900ece7aacd538bb3bacba72e7592e03bd915f /src/cryptonote_core/cryptonote_core.cpp | |
| parent | 53bf62d11457b011ac77d6d2947e662259cfec5e (diff) | |
| parent | ea87b30f8907ee11252433811e7a7d0c46758cca (diff) | |
| download | monzero-core-96758a7d05bb1747951ffac87a307d592f882655.tar.gz monzero-core-96758a7d05bb1747951ffac87a307d592f882655.tar.xz monzero-core-96758a7d05bb1747951ffac87a307d592f882655.zip | |
Merge pull request #8061
ea87b30 Add view tags to outputs to reduce wallet scanning time (j-berman)
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 2d2b1cbcf..a78f5d673 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -1177,7 +1177,8 @@ namespace cryptonote return false; } - if (!check_tx_inputs_ring_members_diff(tx)) + const uint8_t hf_version = m_blockchain_storage.get_current_hard_fork_version(); + if (!check_tx_inputs_ring_members_diff(tx, hf_version)) { MERROR_VER("tx uses duplicate ring members"); return false; @@ -1189,6 +1190,12 @@ namespace cryptonote return false; } + if (!check_output_types(tx, hf_version)) + { + MERROR_VER("tx does not use valid output type(s)"); + return false; + } + return true; } //----------------------------------------------------------------------------------------------- @@ -1295,10 +1302,9 @@ namespace cryptonote return true; } //----------------------------------------------------------------------------------------------- - bool core::check_tx_inputs_ring_members_diff(const transaction& tx) const + bool core::check_tx_inputs_ring_members_diff(const transaction& tx, const uint8_t hf_version) const { - const uint8_t version = m_blockchain_storage.get_current_hard_fork_version(); - if (version >= 6) + if (hf_version >= 6) { for(const auto& in: tx.vin) { |
