From 1c3d0269720a112e552ad1f52edd648a814dc4e8 Mon Sep 17 00:00:00 2001 From: Some Random Crypto Guy Date: Wed, 3 Jul 2024 11:17:53 +0100 Subject: [PATCH] fixed problem with RETURN_PAYMENT on SWEEP_ALL TX outputs; bumped version --- src/checkpoints/checkpoints.cpp | 2 ++ src/version.cpp.in | 2 +- src/wallet/wallet2.cpp | 7 +++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/checkpoints/checkpoints.cpp b/src/checkpoints/checkpoints.cpp index 07f13656b..1c74ef10a 100644 --- a/src/checkpoints/checkpoints.cpp +++ b/src/checkpoints/checkpoints.cpp @@ -182,6 +182,7 @@ namespace cryptonote bool checkpoints::init_default_checkpoints(network_type nettype) { + /* if (nettype == TESTNET) { ADD_CHECKPOINT2(0, "48ca7cd3c8de5b6a4d53d2861fbdaedca141553559f9be9520068053cda8430b", "0x1"); @@ -250,6 +251,7 @@ namespace cryptonote ADD_CHECKPOINT2(2985000, "08f5e6b7301c1b6ed88268a28f8677a06e8ff943b3f9e48d3080f71f9c134bfb", "0x444b7b42a633c96"); ADD_CHECKPOINT2(3088000, "bddf8ca09110d33d6d497f13a113630c2b6af1c84d4f3a6f35cb1446f2604ade", "0x4aed3615c2f8c3e"); ADD_CHECKPOINT2(3102800, "083f4a34f9490403b564286e7f13fd1ed45c52c86fa47195f151594e5bc87504", "0x4bbed52d4da5dfb"); + */ return true; } diff --git a/src/version.cpp.in b/src/version.cpp.in index 2ac13936e..c6bee5674 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 "0.3.6" +#define DEF_SALVIUM_VERSION "0.3.7" #define DEF_MONERO_VERSION_TAG "release" #define DEF_MONERO_VERSION "0.18.3.3" #define DEF_MONERO_RELEASE_NAME "Zero" diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 2b91dd73b..102a5fe7e 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -2223,14 +2223,17 @@ void wallet2::scan_output(const cryptonote::transaction &tx, bool miner_tx, cons { tx_scan_info.money_transfered = tools::decodeRct(tx.rct_signatures, tx_scan_info.received->derivation, i, tx_scan_info.mask, m_account.get_device()); } - // SRCG: The following "if" block was commented out until v0.3.5 - wonder why??? + // SRCG: The following "if" block is commented out for a GOOD REASON... + // 1. Monero doesn't care about 0 amounts, because they don't have a value or purpose. + // 2. Salvium NEEDS to care about 0 amounts, because they are the CHANGE for a TX, and we need the CHANGE to accept RETURN_PAYMENTs. + /* if (tx_scan_info.money_transfered == 0) { MERROR("Invalid output amount, skipping"); tx_scan_info.error = true; return; } - + */ // Populate the unlock_time THROW_WALLET_EXCEPTION_IF(!cryptonote::get_output_unlock_time(tx.vout[i], tx_scan_info.unlock_time), error::wallet_internal_error, "failed to get output unlock_time");