diff options
| author | Riccardo Spagni <ric@spagni.net> | 2018-09-29 21:50:07 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2018-09-29 21:50:07 +0200 |
| commit | 517faceb9e24d2913264036a32da2e0ac14f7b4d (patch) | |
| tree | 7a03c919cd432cf6e2ef096156426c4c5e4d85ab /src/wallet/wallet2.cpp | |
| parent | c6ce8235d86bd9bda2223b63068968bfa90f681c (diff) | |
| parent | 1f8bfe7ffa4470ff3ad9ccbd16116188aaca9fae (diff) | |
| download | monzero-core-0.12.4.0.tar.gz monzero-core-0.12.4.0.tar.xz monzero-core-0.12.4.0.zip | |
Merge pull request #4465v0.12.4.0
1f8bfe7f wallet2: fix transfers between subaddresses hitting the sanity check (moneromooo-monero)
Diffstat (limited to 'src/wallet/wallet2.cpp')
| -rw-r--r-- | src/wallet/wallet2.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 130ca434b..a70434392 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1455,10 +1455,14 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote } // remove change sent to the spending subaddress account from the list of received funds + uint64_t sub_change = 0; for (auto i = tx_money_got_in_outs.begin(); i != tx_money_got_in_outs.end();) { if (subaddr_account && i->first.major == *subaddr_account) + { + sub_change += i->second; i = tx_money_got_in_outs.erase(i); + } else ++i; } @@ -1505,7 +1509,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote LOG_PRINT_L2("Found unencrypted payment ID: " << payment_id); } - uint64_t total_received_2 = 0; + uint64_t total_received_2 = sub_change; for (const auto& i : tx_money_got_in_outs) total_received_2 += i.second; if (total_received_1 != total_received_2) |
