Browse Source
coinchooser: small clean-up re enable_output_value_rounding
master
SomberNight
5 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
5 additions and
5 deletions
-
electrum/coinchooser.py
|
|
@ -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 |
|
|
|