transaction: introduce TxOutput namedtuple
This commit is contained in:
@@ -26,7 +26,7 @@ from collections import defaultdict, namedtuple
|
||||
from math import floor, log10
|
||||
|
||||
from .bitcoin import sha256, COIN, TYPE_ADDRESS, is_address
|
||||
from .transaction import Transaction
|
||||
from .transaction import Transaction, TxOutput
|
||||
from .util import NotEnoughFunds, PrintError
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ class CoinChooserBase(PrintError):
|
||||
# size of the change output, add it to the transaction.
|
||||
dust = sum(amount for amount in amounts if amount < dust_threshold)
|
||||
amounts = [amount for amount in amounts if amount >= dust_threshold]
|
||||
change = [(TYPE_ADDRESS, addr, amount)
|
||||
change = [TxOutput(TYPE_ADDRESS, addr, amount)
|
||||
for addr, amount in zip(change_addrs, amounts)]
|
||||
self.print_error('change:', change)
|
||||
if dust:
|
||||
|
||||
Reference in New Issue
Block a user