Documentation ¶
Index ¶
- func RandomBLSSignature() []byte
- func RandomBlock(height uint64, txBatchCount uint16) *block.Block
- func RandomCertificate() *block.Certificate
- func RandomHeader(height uint64) *block.Header
- func RandomInput(t *testing.T) []byte
- func RandomInputs(t *testing.T, size int) [][]byte
- func RandomOutput(t *testing.T) *transactions.Note
- func RandomOutputs(t *testing.T, size int) []*transactions.Note
- func RandomSlice(size uint32) []byte
- func TwoLinkedBlocks(t *testing.T) (*block.Block, *block.Block)
- func TxsToBuffer(t *testing.T, txs []transactions.ContractCall) *bytes.Buffer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomBLSSignature ¶ added in v0.4.0
func RandomBLSSignature() []byte
RandomBLSSignature returns a valid BLS Signature of a bogus message.
func RandomBlock ¶
RandomBlock returns a random block for testing. For `height` see also helper.RandomHeader. For txBatchCount see also helper.RandomSliceOfTxs.
func RandomCertificate ¶
func RandomCertificate() *block.Certificate
RandomCertificate returns a random block certificate for testing.
func RandomHeader ¶
RandomHeader returns a random header for testing. `height` randomness is up to the caller. A global atomic counter per pkg can handle it.
func RandomInput ¶
RandomInput returns a random input for testing.
func RandomInputs ¶
RandomInputs returns a slice of inputs of size `size` for testing.
func RandomOutput ¶
func RandomOutput(t *testing.T) *transactions.Note
RandomOutput returns a random output for testing.
func RandomOutputs ¶
func RandomOutputs(t *testing.T, size int) []*transactions.Note
RandomOutputs returns a slice of random outputs for testing.
func RandomSlice ¶
RandomSlice returns a random slice of size `size`.
func TwoLinkedBlocks ¶
TwoLinkedBlocks returns two blocks that are linked via their headers.
func TxsToBuffer ¶ added in v0.2.0
func TxsToBuffer(t *testing.T, txs []transactions.ContractCall) *bytes.Buffer
TxsToBuffer converts a slice of transactions to a bytes.Buffer.
Types ¶
This section is empty.