Browse Source

Merge #1126: Allow RPC coinjoin taker_finished to accept unconf

fe46b7e Allow RPC coinjoin taker_finished to accept unconf (Adam Gibson)
master
Adam Gibson 4 years ago
parent
commit
76cb7301bf
No known key found for this signature in database
GPG Key ID: 141001A1AF77F20B
  1. 13
      jmclient/jmclient/wallet_rpc.py

13
jmclient/jmclient/wallet_rpc.py

@ -378,15 +378,22 @@ class JMWalletDaemon(Service):
# TODO this may be updated.
# It is also different in that the event loop must not shut down
# when processing finishes.
assert fromtx is False
# This assertion is making sure that the callback is not a non-final
# schedule entry (see the comment above as to why). We accept
# either False or 'unconfirmed' since they can arrive in either order.
assert fromtx is not True
# reset our state on completion, we are no longer coinjoining:
self.taker = None
if not res:
jlog.info("Coinjoin did not complete successfully.")
#Should usually be unreachable, unless conf received out of order;
#because we should stop on 'unconfirmed' for last (see above)
else:
jlog.info("Coinjoin completed correctly")
# reset our state on completion, we are no longer coinjoining:
self.taker = None
# Note; it's technically possible for this to return False if somehow
# we are currently in inactive state, but it isn't an error:
self.activate_coinjoin_state(CJ_NOT_RUNNING)

Loading…
Cancel
Save