tDon't split small change - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 97bc1b278876674e3481f135f28413c7877aec5d
DIR parent efa1efedca6e6916db44e26101c70434b771e5e6
HTML Author: Neil Booth <kyuupichan@gmail.com>
Date: Sat, 23 Jan 2016 22:10:25 +0900
Don't split small change
Diffstat:
M lib/coinchooser.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
DIR diff --git a/lib/coinchooser.py b/lib/coinchooser.py
t@@ -100,7 +100,8 @@ class CoinChooserBase(PrintError):
def change_amounts(self, tx, count, fee_estimator, dust_threshold):
# Break change up if bigger than max_change
output_amounts = [o[2] for o in tx.outputs()]
- max_change = max(max(output_amounts) * 1.25, dust_threshold * 10)
+ # Don't split change of less than 0.02 BTC
+ max_change = max(max(output_amounts) * 1.25, 0.02 * COIN)
# Use N change outputs
for n in range(1, count + 1):