From 5ebeb45786aa314e5d5304c21fa0eeb9c8aeaefb Mon Sep 17 00:00:00 2001 From: AdamISZ Date: Sun, 3 Sep 2017 15:10:21 +0300 Subject: [PATCH] fix maxmixdepth bug if requested higher than default --- scripts/sendpayment.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/sendpayment.py b/scripts/sendpayment.py index b352ec8..24f4878 100644 --- a/scripts/sendpayment.py +++ b/scripts/sendpayment.py @@ -125,7 +125,9 @@ def main(): log.debug('starting sendpayment') if not options.userpcwallet: - max_mix_depth = max([mixdepth, options.amtmixdepths]) + #maxmixdepth in the wallet is actually the *number* of mixdepths (so misnamed); + #to ensure we have enough, must be at least (requested index+1) + max_mix_depth = max([mixdepth+1, options.amtmixdepths]) if not os.path.exists(os.path.join('wallets', wallet_name)): wallet = walletclass(wallet_name, None, max_mix_depth, options.gaplimit) else: