com.r3corda.simulation / Simulation / iterate

# iterate

`open fun iterate(): <ERROR CLASS>?`

Iterates the simulation by one step.

The default implementation circles around the nodes, pumping until one of them handles a message. The next call will carry on from where this one stopped. In an environment where you want to take actions between anything interesting happening, or control the precise speed at which things operate (beyond the latency injector), this is a useful way to do things.

Return
the message that was processed, or null if no node accepted a message in this round.