[bug] don't filter out freezed outputs but ignore them when selecting
This commit is contained in:
parent
f74c9a324b
commit
2837fb6939
@ -24,11 +24,7 @@ pub fn create_transaction(
|
||||
) -> Result<Psbt> {
|
||||
let mut available_outpoints: HashMap<OutPoint, OwnedOutput> = sp_wallet
|
||||
.get_outputs()
|
||||
.to_spendable_list()
|
||||
// filter out freezed utxos
|
||||
.into_iter()
|
||||
.filter(|(outpoint, _)| !freezed_utxos.contains(outpoint))
|
||||
.collect();
|
||||
.to_spendable_list();
|
||||
|
||||
let sum_outputs = recipients
|
||||
.iter()
|
||||
@ -51,6 +47,7 @@ pub fn create_transaction(
|
||||
let fee_provision = Amount::from_sat(1000);
|
||||
|
||||
for (outpoint, output) in available_outpoints {
|
||||
if freezed_utxos.contains(&outpoint) { continue }
|
||||
if total_available > sum_outputs.checked_add(fee_provision).unwrap() {
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user