Skip to content

Commit 9fc6158

Browse files
authored
Fix: Correct GeneratedAccountsMnemonics Check (#5274)
1 parent f03090f commit 9fc6158

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/pingpong/runCmd.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,9 @@ var runCmd = &cobra.Command{
438438
cfg.GeneratedAccountSampleMethod = generatedAccountSampleMethod
439439
}
440440
// check if numAccounts is greater than the length of the mnemonic list, if provided
441-
if cfg.DeterministicKeys && cfg.NumPartAccounts > uint32(len(cfg.GeneratedAccountsMnemonics)) {
441+
if cfg.DeterministicKeys &&
442+
len(cfg.GeneratedAccountsMnemonics) > 0 &&
443+
cfg.NumPartAccounts > uint32(len(cfg.GeneratedAccountsMnemonics)) {
442444
reportErrorf("numAccounts is greater than number of account mnemonics provided")
443445
}
444446

0 commit comments

Comments
 (0)