Disallow less than 1 mixdepth in changemixdepth.

Maxmixdepth error msg in tumbler: fix off-by-one

bugfix md num
This commit is contained in:
AdamISZ 2018-09-28 13:12:25 +02:00
parent 897837299f
commit 6a26e48def
No known key found for this signature in database
GPG key ID: B3AE09F1E9A3197A
2 changed files with 3 additions and 1 deletions

View file

@ -1054,6 +1054,8 @@ def wallet_tool_main(wallet_root_path):
elif method == "signmessage":
return wallet_signmessage(wallet, options.hd_path, args[2])
elif method == 'changemixdepth':
if options.mixdepth < 1:
return "Number of mixdepths must be at least 1"
return change_wallet_mixdepth(wallet, options.mixdepth-1)

View file

@ -38,7 +38,7 @@ def main():
print("Your wallet does not contain the required number of mixdepths: ",
max_mix_depth)
print("Increase using this command: `python wallet-tool.py -m ",
max_mix_depth, " (yourwalletname) changemixdepth")
max_mix_depth + 1, " (yourwalletname) changemixdepth")
print("Then start the tumbler again with the same settings.")
sys.exit(0)
if jm_single().config.get("BLOCKCHAIN",