From a5523be459bfac3b22eecefc2ba46eac0cfd6e12 Mon Sep 17 00:00:00 2001 From: Some Random Crypto Guy Date: Tue, 10 Mar 2026 13:56:13 +0000 Subject: [PATCH] bumped testnet version to prevent collision with old remnants; bumped version number; fixed duplicate CREATE_TOKEN issues --- src/cryptonote_config.h | 2 +- src/cryptonote_core/tx_pool.cpp | 17 +++++++++++++++-- src/version.cpp.in | 2 +- src/wallet/wallet2.cpp | 2 +- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index 90cc27253..d2fc04368 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -254,7 +254,7 @@ #define HF_VERSION_ENABLE_ORACLE 255 #define HF_VERSION_SLIPPAGE_YIELD 255 -#define TESTNET_VERSION 15 +#define TESTNET_VERSION 16 #define STAGENET_VERSION 1 #define PER_KB_FEE_QUANTIZATION_DECIMALS 8 diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp index a8d510c1c..021fde0f4 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -275,6 +275,13 @@ namespace cryptonote return false; } + // HERE BE DRAGONS!!! + // Check that CREATE_TOKEN txs are unique in the pool + if (tx.type == cryptonote::transaction_type::CREATE_TOKEN) { + // TODO: ...scan the existing entries - requires either a registry of CREATE_TOKEN TXs, or to interatively process the pool + } + // LAND AHOY!!! + // assume failure during verification steps until success is certain tvc.m_verifivation_failed = true; @@ -1649,11 +1656,17 @@ namespace cryptonote LOG_PRINT_L2("Filling block template, median weight " << median_weight << ", " << m_txs_by_fee_and_receive_time.size() << " txes in the pool"); - LockedTXN lock(m_blockchain.get_db()); - // Store list of tokens being created std::set tokens; + // Get the list of already-created tokens that are in the DB + std::map mapTokens = m_blockchain.get_db().get_tokens(); + for (const auto &entry: mapTokens) { + tokens.insert(entry.second.asset_type); + } + + LockedTXN lock(m_blockchain.get_db()); + auto sorted_it = m_txs_by_fee_and_receive_time.begin(); for (; sorted_it != m_txs_by_fee_and_receive_time.end(); ++sorted_it) { diff --git a/src/version.cpp.in b/src/version.cpp.in index 0db65ac0f..c9a9bac51 100644 --- a/src/version.cpp.in +++ b/src/version.cpp.in @@ -1,5 +1,5 @@ #define DEF_SALVIUM_VERSION_TAG "@VERSIONTAG@" -#define DEF_SALVIUM_VERSION "1.1.0-rc3" +#define DEF_SALVIUM_VERSION "1.1.0-rc4" #define DEF_MONERO_VERSION_TAG "release" #define DEF_MONERO_VERSION "0.18.4.0" #define DEF_MONERO_RELEASE_NAME "One" diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 22632cd00..17f55be48 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -9574,7 +9574,7 @@ void wallet2::get_outs(std::vector> // check we're clear enough of rct start, to avoid corner cases below THROW_WALLET_EXCEPTION_IF(rct_offsets.size() <= CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE, error::get_output_distribution, "Not enough rct outputs"); - THROW_WALLET_EXCEPTION_IF(rct_offsets.back() <= max_rct_index, + THROW_WALLET_EXCEPTION_IF(rct_offsets.back() < max_rct_index, error::get_output_distribution, "Daemon reports suspicious number of rct outputs"); }