From 042f91df7bc4c35aca6bc207f35e6051a51043fd Mon Sep 17 00:00:00 2001 From: kyurais Date: Fri, 16 Feb 2024 18:59:41 +0400 Subject: [PATCH] initialize estimated_fee before while loop --- bit/transaction.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bit/transaction.py b/bit/transaction.py index cfdc1c2..f6db4b2 100644 --- a/bit/transaction.py +++ b/bit/transaction.py @@ -313,6 +313,7 @@ def branch_and_bound(d, selected_coins, effective_value, target, fee, sorted_uns # To have a deterministic way of inserting inputs when # consolidating, we only shuffle the unspents otherwise. shuffle(unspents) + estimated_fee = 0 while unspents: selected_coins.append(unspents.pop(0)) estimated_fee = estimate_tx_fee(