Skip to content

Commit

Permalink
fixed simulation tests
Browse files Browse the repository at this point in the history
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
  • Loading branch information
RiccardoM committed May 27, 2022
1 parent a21744a commit 153fbff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/posts/simulation/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ func randomUserAnswers(r *rand.Rand, attachments []types.Attachment, accs []simt
}
}

if len(polls) == 0 {
return nil
}

answersNumber := r.Intn(50)
for index := 0; index < answersNumber; index++ {
attachment := RandomAttachment(r, polls)
Expand Down

0 comments on commit 153fbff

Please sign in to comment.