From 8eff5d31ebd2767b36612fd3baca84998b648bd0 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Wed, 8 Feb 2023 16:42:08 +0100 Subject: [PATCH] cmd/pool: increase default number of keys to try in recovery This commit fixes an issue where a large number of attempts at creating an account lead to the index of the first successful account to be higher than the previous number of keys we tried by default. This resulted in the account not being recovered without manually overriding this value in the command line. --- cmd/pool/account.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/pool/account.go b/cmd/pool/account.go index ea3f474..88b65ce 100644 --- a/cmd/pool/account.go +++ b/cmd/pool/account.go @@ -74,7 +74,7 @@ const ( // defaultAccountTarget is the default number of accounts that will try // to recreate in the account recovery process. - defaultAccountTarget = 20 + defaultAccountTarget = 50 ) var ( @@ -874,9 +874,10 @@ var recoverAccountsCommand = cli.Command{ }, cli.Uint64Flag{ Name: "account_target", - Usage: "number of accounts that we are looking to " + - "recover, set higher if there were more than " + - "20 accounts", + Usage: fmt.Sprintf("number of accounts that we are "+ + "looking to recover, set higher if there were "+ + "more than %d accounts or attempts at "+ + "creating accounts", defaultAccountTarget), Value: defaultAccountTarget, }, cli.StringFlag{