diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-09-26 17:31:15 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-09-27 12:42:08 +0100 |
commit | 4e115a3a4c1d3b12fe2beca116dd9674ca1d5c06 (patch) | |
tree | 0a49e448e9298a46d7b81d8dbb5130994d60f89d /src/cryptonote_core/blockchain.cpp | |
parent | Merge pull request #2533 (diff) | |
download | monero-4e115a3a4c1d3b12fe2beca116dd9674ca1d5c06.tar.xz |
core: remove out sorting from v7 rules
and restore random shuffle of outputs
This turned out to have a flaw (sort order depends on output
index), and this doesn't really bring much anyway
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 0b09d503c..46427d161 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -2383,26 +2383,6 @@ bool Blockchain::check_tx_outputs(const transaction& tx, tx_verification_context } } - // from v7, sorted outs - if (m_hardfork->get_current_version() >= 7) { - const crypto::public_key *last_key = NULL; - for (size_t n = 0; n < tx.vout.size(); ++n) - { - const tx_out &o = tx.vout[n]; - if (o.target.type() == typeid(txout_to_key)) - { - const txout_to_key& out_to_key = boost::get<txout_to_key>(o.target); - if (last_key && memcmp(&out_to_key.key, last_key, sizeof(*last_key)) >= 0) - { - MERROR_VER("transaction has unsorted outputs"); - tvc.m_invalid_output = true; - return false; - } - last_key = &out_to_key.key; - } - } - } - return true; } //------------------------------------------------------------------ |