mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
coinchooser: small clean-up re enable_output_value_rounding
This commit is contained in:
parent
d1f860ccf3
commit
5958fa8b2d
1 changed files with 5 additions and 5 deletions
|
@ -103,10 +103,9 @@ def strip_unneeded(bkts: List[Bucket], sufficient_funds) -> List[Bucket]:
|
|||
|
||||
class CoinChooserBase(Logger):
|
||||
|
||||
enable_output_value_rounding = False
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, *, enable_output_value_rounding: bool):
|
||||
Logger.__init__(self)
|
||||
self.enable_output_value_rounding = enable_output_value_rounding
|
||||
|
||||
def keys(self, coins: Sequence[PartialTxInput]) -> Sequence[str]:
|
||||
raise NotImplementedError
|
||||
|
@ -485,6 +484,7 @@ def get_name(config):
|
|||
|
||||
def get_coin_chooser(config):
|
||||
klass = COIN_CHOOSERS[get_name(config)]
|
||||
coinchooser = klass()
|
||||
coinchooser.enable_output_value_rounding = config.get('coin_chooser_output_rounding', False)
|
||||
coinchooser = klass(
|
||||
enable_output_value_rounding=config.get('coin_chooser_output_rounding', False),
|
||||
)
|
||||
return coinchooser
|
||||
|
|
Loading…
Add table
Reference in a new issue