Documentation ¶
Overview ¶
Package prottest provides utilities for Chain Protocol testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockKeyPairs ¶
BlockKeyPairs returns the configured block-signing key-pairs for the provided Chain.
func MakeBlock ¶
MakeBlock makes a new block from txs, commits it, and returns it. It assumes c's consensus program requires 0 signatures. (This is true for chains returned by NewChain.) If c requires more than 0 signatures, MakeBlock will fail. MakeBlock always makes a block; if there are no transactions in txs, it makes an empty block.
Types ¶
type Option ¶
Option is a configuration option for NewChain.
func WithBlockSigners ¶
WithBlockSigners is an option for NewChain that configures the NextPredicate for blocks in the new chain. It generates a suitable number of random new keypairs and stores them in the global maps blockPubkeys and blockPrivkeys.
func WithOutputIDs ¶
WithOutputIDs is an option for NewChain that prepopulates the blockchain's utxo set with the given hashes.