From 67334071a67c6d8dfc0791d2b8394ac29609d331 Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Mon, 19 Dec 2022 23:09:17 +0100 Subject: [PATCH] fixed sweep_below command in simplewallet(credits to @sowle) --- src/wallet/wallet2.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 1a62584d..d710c52e 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -6336,8 +6336,11 @@ void wallet2::sweep_below(size_t fake_outs_count, const currency::account_public return rc_too_few_outputs; // try to construct a transaction + + assets_selection_context needed_money_map; + needed_money_map[currency::null_hash] = {}; std::vector dsts({ tx_destination_entry(amount_swept - fee, destination_addr) }); - prepare_tx_destinations(0, 0, get_current_split_strategy(), tools::tx_dust_policy(), dsts, ftp.prepared_destinations, currency::null_hash); + prepare_tx_destinations(needed_money_map, get_current_split_strategy(), tools::tx_dust_policy(), dsts, ftp.prepared_destinations); currency::transaction tx = AUTO_VAL_INIT(tx); crypto::secret_key tx_key = AUTO_VAL_INIT(tx_key);