From afc2518ef736538b20f9916db6ed4e606dbb3262 Mon Sep 17 00:00:00 2001 From: Some Random Crypto Guy Date: Thu, 31 Oct 2024 11:47:20 +0000 Subject: [PATCH] fixed boundary condition returning pre-HF2 TXs; removed a couple of extraneous vars; added a logging message; bumped version --- README.md | 10 +++++----- src/simplewallet/simplewallet.cpp | 17 +++++++---------- src/version.cpp.in | 2 +- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 845c9fb..13d9fa9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Salvium Zero v0.6.1 +# Salvium Zero v0.6.2 Copyright (c) 2023-2024, Salvium Portions Copyright (c) 2014-2023, The Monero Project @@ -172,7 +172,7 @@ invokes cmake commands as needed. ```bash cd salvium - git checkout release-v0.18 + git checkout v0.6.2 make ``` @@ -251,7 +251,7 @@ Tested on a Raspberry Pi Zero with a clean install of minimal Raspbian Stretch ( ```bash git clone https://github.com/salvium/salvium cd salvium - git checkout v0.6.1 + git checkout v0.6.2 ``` * Build: @@ -370,10 +370,10 @@ application. cd salvium ``` -* If you would like a specific [version/tag](https://github.com/salvium/salvium/tags), do a git checkout for that version. eg. 'v0.6.1'. If you don't care about the version and just want binaries from master, skip this step: +* If you would like a specific [version/tag](https://github.com/salvium/salvium/tags), do a git checkout for that version. eg. 'v0.6.2'. If you don't care about the version and just want binaries from master, skip this step: ```bash - git checkout v0.6.1 + git checkout v0.6.2 ``` * If you are on a 64-bit system, run: diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index d5298de..a5bac65 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -6942,7 +6942,7 @@ bool simple_wallet::transfer_main( { // figure out what tx will be necessary std::vector ptx_vector; - uint64_t bc_height, unlock_block = 0; + uint64_t unlock_block = 0; std::string err; switch (transfer_type) { @@ -6959,12 +6959,6 @@ bool simple_wallet::transfer_main( ptx_vector = m_wallet->create_transactions_2(dsts, source_asset, dest_asset, cryptonote::transaction_type::STAKE, fake_outs_count, unlock_block /* unlock_time */, priority, extra, m_current_subaddress_account, subaddr_indices, subtract_fee_from_outputs); break; case TransferLocked: - bc_height = get_daemon_blockchain_height(err); - if (!err.empty()) - { - fail_msg_writer() << tr("failed to get blockchain height: ") << err; - return false; - } unlock_block = locked_blocks; ptx_vector = m_wallet->create_transactions_2(dsts, source_asset, dest_asset, cryptonote::transaction_type::TRANSFER, fake_outs_count, unlock_block /* unlock_time */, priority, extra, m_current_subaddress_account, subaddr_indices, subtract_fee_from_outputs); break; @@ -8043,7 +8037,7 @@ bool simple_wallet::return_payment(const std::vector &args_) return true; } - if (td.m_tx.version >= HF_VERSION_ENABLE_N_OUTS) { + if (td.m_tx.version >= TRANSACTION_VERSION_N_OUTS) { if (td.m_tx.return_address_list.empty() || td.m_tx.return_address_change_mask.empty()) { fail_msg_writer() << tr("invalid return_address_list for txid ") << args_[0]; return true; @@ -8380,7 +8374,7 @@ bool simple_wallet::supply_info(const std::vector &args) { message_writer(console_color_default, false) << boost::format(tr("SUPPLY INFO")); // For each asset, print the circulating supply and value - boost::multiprecision::uint128_t total_supply = 0; + //boost::multiprecision::uint128_t total_supply = 0; for (auto supply_asset: supply_amounts) { // get supply @@ -8410,7 +8404,10 @@ bool simple_wallet::yield_info(const std::vector &args) { // EXPERIMENTAL - change to get_yield_summary_info() method uint64_t t_burnt, t_supply, t_locked, t_yield, yps, ybi_size; std::vector> yield_payouts; - bool ok = m_wallet->get_yield_summary_info(t_burnt, t_supply, t_locked, t_yield, yps, ybi_size, yield_payouts); + if (!m_wallet->get_yield_summary_info(t_burnt, t_supply, t_locked, t_yield, yps, ybi_size, yield_payouts)) { + fail_msg_writer() << "failed to get yield info. Make sure you are connected to a daemon."; + return false; + } // Get the chain height const uint64_t blockchain_height = m_wallet->get_blockchain_current_height(); diff --git a/src/version.cpp.in b/src/version.cpp.in index 183eb94..344a3eb 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.6.1" +#define DEF_SALVIUM_VERSION "0.6.2" #define DEF_MONERO_VERSION_TAG "release" #define DEF_MONERO_VERSION "0.18.3.3" #define DEF_MONERO_RELEASE_NAME "Zero"