Documentation ¶
Index ¶
- type TransactionResultGenerator
- func (g *TransactionResultGenerator) Next() *types.TransactionWithResult
- func (g *TransactionResultGenerator) WithAddresses(n int) *TransactionResultGenerator
- func (g *TransactionResultGenerator) WithBlocks(n int) *TransactionResultGenerator
- func (g *TransactionResultGenerator) WithLayers(start int, n int) *TransactionResultGenerator
- func (g *TransactionResultGenerator) WithSeed(seed int64) *TransactionResultGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TransactionResultGenerator ¶
type TransactionResultGenerator struct { Blocks []types.BlockID Addrs []types.Address Layers []types.LayerID // contains filtered or unexported fields }
TransactionResultGenerator generates random transaction with results. Transactions are not syntactically or contextually valid. This is for testing databases and APIs.
func NewTransactionResultGenerator ¶
func NewTransactionResultGenerator() *TransactionResultGenerator
NewTransactionResultGenerator with some random parameters.
func (*TransactionResultGenerator) Next ¶
func (g *TransactionResultGenerator) Next() *types.TransactionWithResult
Next generates TransactionWithResult.
func (*TransactionResultGenerator) WithAddresses ¶
func (g *TransactionResultGenerator) WithAddresses(n int) *TransactionResultGenerator
WithAddresses update addresses.
func (*TransactionResultGenerator) WithBlocks ¶
func (g *TransactionResultGenerator) WithBlocks(n int) *TransactionResultGenerator
WithBlocks update blocks ids.
func (*TransactionResultGenerator) WithLayers ¶
func (g *TransactionResultGenerator) WithLayers(start int, n int) *TransactionResultGenerator
WithLayers updates layers.
func (*TransactionResultGenerator) WithSeed ¶
func (g *TransactionResultGenerator) WithSeed(seed int64) *TransactionResultGenerator
WithSeed update randomness source.
Click to show internal directories.
Click to hide internal directories.