diff --git a/README.md b/README.md index 68acc6d..0dc99ed 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Portions Copyright (c) 2012-2013 The Cryptonote developers. - Web: [salvium.io](https://salvium.io) - Mail: [dev@salvium.io](mailto:dev@salvium.io) -- GitHub: [https://github.com/somerandomcryptoguy/salvium](https://github.com/somerandomcryptoguy/salvium) +- GitHub: [https://github.com/salvium/salvium](https://github.com/salvium/salvium) ## Introduction @@ -147,7 +147,7 @@ pkg install git gmake cmake pkgconf boost-libs libzmq4 libsodium unbound Clone recursively to pull-in needed submodule(s): ``` -git clone --recursive https://github.com/somerandomcryptoguy/salvium +git clone --recursive https://github.com/salvium/salvium ``` If you already have a repo cloned, initialize and update: @@ -249,7 +249,7 @@ Tested on a Raspberry Pi Zero with a clean install of minimal Raspbian Stretch ( * Clone Salvium and checkout the most recent release version: ```bash - git clone https://github.com/somerandomcryptoguy/salvium + git clone https://github.com/salvium/salvium cd salvium git checkout v0.4.0 ``` @@ -359,7 +359,7 @@ application. * To git clone, run: ```bash - git clone --recursive https://github.com/somerandomcryptoguy/salvium + git clone --recursive https://github.com/salvium/salvium ``` **Building** @@ -370,7 +370,7 @@ application. cd salvium ``` -* If you would like a specific [version/tag](https://github.com/somerandomcryptoguy/salvium/tags), do a git checkout for that version. eg. 'v0.4.0'. 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.4.0'. If you don't care about the version and just want binaries from master, skip this step: ```bash git checkout v0.4.0 diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 102a5fe..f17e3ca 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -2687,7 +2687,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote if (!ignore_callbacks && 0 != m_callback) m_callback->on_money_received(height, txid, tx, td.m_amount, td.asset_type, 0, td.m_subaddr_index, spends_one_of_ours(tx), td.m_tx.unlock_time, td.m_td_origin_idx); } - std::string asset_type = m_transfers.back().asset_type; + std::string asset_type = tx_scan_info[o].asset_type; if (total_received_1.count(asset_type)) total_received_1[asset_type] += amount; else @@ -2715,8 +2715,10 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote } } else if (tx.type == cryptonote::transaction_type::TRANSFER) { + + // We might store garbage entries here occasionally, but they shouldn't impact performance significantly crypto::public_key P_change = crypto::null_pkey; - size_t change_idx = m_transfers.back().m_internal_output_index; + size_t change_idx = o; THROW_WALLET_EXCEPTION_IF(!cryptonote::get_output_public_key(tx.vout[change_idx], P_change), error::wallet_internal_error, "Failed to get output public key"); m_subaddresses[P_change] = {0,0}; m_salvium_txs.insert({P_change, m_transfers.size()-1});