sawtooth.simulator module

class sawtooth.simulator.PendingTransaction(id, client)

Bases: tuple

Create new instance of PendingTransaction(id, client)

__getnewargs__()

Return self as a plain tuple. Used by copy and pickle.

__getstate__()

Exclude the OrderedDict from pickling

__repr__()

Return a nicely formatted representation string

client

Alias for field number 1

id

Alias for field number 0

class sawtooth.simulator.SawtoothWorkloadSimulator(config)[source]

Bases: object

run()[source]
on_new_transaction(transaction_id, client)[source]

Called by the workload generator to let the simulator know that a new transaction should be tracked.

Parameters:
  • transaction_id – The ID for the new transaction
  • client – The validator to which the transaction has been submitted. This object should support the public methods in SawtoothClient.
Returns:

Nothing