1
0

coinchooser methods should not belong in wallet class

This commit is contained in:
ThomasV
2016-03-10 16:37:45 +01:00
parent d9c567446c
commit bca0f31fca
4 changed files with 21 additions and 21 deletions

View File

@@ -308,3 +308,13 @@ class CoinChooserPrivacy(CoinChooserRandom):
COIN_CHOOSERS = {'Priority': CoinChooserOldestFirst,
'Privacy': CoinChooserPrivacy}
def get_name(config):
kind = config.get('coin_chooser')
if not kind in COIN_CHOOSERS:
kind = 'Priority'
return kind
def get_coin_chooser(config):
klass = COIN_CHOOSERS[get_name(config)]
return klass()