From c519d1df347e826fc058ecf3d4230bf245a76bbe Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 23 Apr 2019 21:57:19 +0000 Subject: [PATCH] wallet2: fix wrong change being recorded in sweep_all leading to the sanity check triggering --- src/wallet/wallet2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 831166d5f..80068e1e7 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -9534,7 +9534,7 @@ std::vector wallet2::create_transactions_2(std::vector wallet2::create_transactions_from(const crypton tx.ptx = test_ptx; tx.weight = get_transaction_weight(test_tx, txBlob.size()); tx.outs = outs; - tx.needed_fee = needed_fee; + tx.needed_fee = test_ptx.fee; accumulated_fee += test_ptx.fee; accumulated_change += test_ptx.change_dts.amount; if (!unused_transfers_indices.empty() || !unused_dust_indices.empty())