Browse Source

fix: update taker state after fee config check

This commit fixes an issue regarding a wrong taker state caused by
initiating a taker operation when no `max_cj_fee` value is present.
Before this change the taker state switches to `running` indefinitely.
After this change the config check is made before updating the state.
master
Thebora Kompanioni 4 years ago committed by GitHub
parent
commit
b1542c6d1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      jmclient/jmclient/wallet_rpc.py

6
jmclient/jmclient/wallet_rpc.py

@ -985,9 +985,6 @@ class JMWalletDaemon(Service):
rounding, completion_flag]]
except ValueError:
raise InvalidRequestFormat()
# Before actual start, update our coinjoin state:
if not self.activate_coinjoin_state(CJ_TAKER_RUNNING):
raise ServiceAlreadyStarted()
# Instantiate a Taker.
# `order_chooser` is whatever is default for Taker.
# max_cj_fee is to be set based on config values.
@ -1000,6 +997,9 @@ class JMWalletDaemon(Service):
raise ConfigNotPresent()
max_cj_fee= get_max_cj_fee_values(jm_single().config,
None, user_callback=dummy_user_callback)
# Before actual start, update our coinjoin state:
if not self.activate_coinjoin_state(CJ_TAKER_RUNNING):
raise ServiceAlreadyStarted()
self.taker = Taker(self.services["wallet"], schedule,
max_cj_fee = max_cj_fee,
callbacks=(self.filter_orders_callback,

Loading…
Cancel
Save