diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 2 | ||||
-rw-r--r-- | src/cryptonote_core/tx_pool.cpp | 9 | ||||
-rw-r--r-- | src/wallet/wallet2.cpp | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 9972b25e5..547f2d4c2 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -2285,7 +2285,7 @@ bool Blockchain::check_tx_inputs(const transaction& tx, tx_verification_context } // for v3, we force txes with all mixable inputs to be rct - if (m_hardfork->get_current_version() >= 3) + if (m_hardfork->get_current_version() >= 4) { if (n_unmixable == 0 && tx.version == 1) { diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp index c2414f581..3666088f1 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -85,10 +85,15 @@ namespace cryptonote return false; } - const size_t max_tx_version = version == 1 ? 1 : 2; + const size_t max_tx_version = (version <= 3) ? 1 : 2; if (tx.version > max_tx_version) { - // v2 is the latest one we know + tvc.m_verifivation_failed = true; + return false; + } + const size_t min_tx_version = (version >= 5) ? 2 : 1; + if (tx.version < min_tx_version) + { tvc.m_verifivation_failed = true; return false; } diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 69063e780..966c94200 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -3254,7 +3254,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp bool adding_fee; // true if new outputs go towards fee, rather than destinations uint64_t needed_fee, available_for_fee = 0; uint64_t upper_transaction_size_limit = get_upper_tranaction_size_limit(); - const bool use_rct = use_fork_rules(3); + const bool use_rct = use_fork_rules(4); fee_multiplier = sanitize_fee_multiplier(fee_multiplier); @@ -3503,7 +3503,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_all(const cryptono std::vector<TX> txes; uint64_t needed_fee, available_for_fee = 0; uint64_t upper_transaction_size_limit = get_upper_tranaction_size_limit(); - const bool use_rct = use_fork_rules(3); + const bool use_rct = use_fork_rules(4); // gather all our dust and non dust outputs for (size_t i = 0; i < m_transfers.size(); ++i) |