add nonce to mock transaction for easier debugging

This commit is contained in:
Mark Spanbroek 2024-11-06 16:34:55 +01:00
parent 6f0035c8fa
commit 01cbefe898
2 changed files with 4 additions and 2 deletions

View File

@ -1,8 +1,10 @@
import std/random
import mysticeti/dependencies/transacting
type
MockTransaction = object
nonce: int
MockTransacting* = Transacting[MockTransaction]
proc example*(_: type MockTransaction): MockTransaction =
discard
MockTransaction(nonce: rand(int))

View File

@ -306,7 +306,7 @@ suite "Validator Network":
author = CommitteeMember(0),
round = 0,
parents = @[],
transactions = seq[Transaction].example
transactions = seq[Transaction].example(length = 1..10)
))
# validator 0 sends different proposals to different parts of the network
!exchangeBlock(simulator.validators[0], simulator.validators[0], proposalA)