Skip to content

Commit

Permalink
Fix: Correct GeneratedAccountsMnemonics Check (#5274)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlgoAxel committed Apr 28, 2023
1 parent f03090f commit 9fc6158
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/pingpong/runCmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,9 @@ var runCmd = &cobra.Command{
cfg.GeneratedAccountSampleMethod = generatedAccountSampleMethod
}
// check if numAccounts is greater than the length of the mnemonic list, if provided
if cfg.DeterministicKeys && cfg.NumPartAccounts > uint32(len(cfg.GeneratedAccountsMnemonics)) {
if cfg.DeterministicKeys &&
len(cfg.GeneratedAccountsMnemonics) > 0 &&
cfg.NumPartAccounts > uint32(len(cfg.GeneratedAccountsMnemonics)) {
reportErrorf("numAccounts is greater than number of account mnemonics provided")
}

Expand Down

0 comments on commit 9fc6158

Please sign in to comment.