Browse Source

Merge #467: Don't allow receive-payjoin start up without coins

1e1b03d Don't allow receive-payjoin start up without coins (Adam Gibson)
master
Adam Gibson 6 years ago
parent
commit
8a0987ff82
No known key found for this signature in database
GPG Key ID: 141001A1AF77F20B
  1. 6
      scripts/receive-payjoin.py

6
scripts/receive-payjoin.py

@ -77,6 +77,12 @@ def receive_payjoin_main(makerclass):
while not wallet_service.synced:
wallet_service.sync_wallet(fast=not options.recoversync)
wallet_service.startService()
# having enforced wallet sync, we can check if we have coins
# to do payjoin in the mixdepth
if wallet_service.get_balance_by_mixdepth()[options.mixdepth] == 0:
jlog.error("Cannot do payjoin from mixdepth " + str(
options.mixdepth) + ", no coins. Shutting down.")
sys.exit(EXIT_ARGERROR)
maker = makerclass(wallet_service, options.mixdepth, receiving_amount)

Loading…
Cancel
Save