Documentation ¶
Index ¶
- type EpochQuery
- type ExecutionState
- func (es *ExecutionState) ExecuteBlock(t *testing.T, block *flow.Block)
- func (es *ExecutionState) PersistStateCommitment(ctx context.Context, blockID flow.Identifier, commit flow.StateCommitment) error
- func (es *ExecutionState) StateCommitmentByBlockID(ctx context.Context, blockID flow.Identifier) (flow.StateCommitment, error)
- type Params
- type ProtocolState
- type ProtocolStateMutator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EpochQuery ¶
type EpochQuery struct {
// contains filtered or unexported fields
}
EpochQuery implements protocol.EpochQuery for testing purposes.
func NewEpochQuery ¶
func (*EpochQuery) Add ¶
func (mock *EpochQuery) Add(epoch protocol.Epoch)
func (*EpochQuery) Current ¶
func (mock *EpochQuery) Current() protocol.Epoch
func (*EpochQuery) Next ¶
func (mock *EpochQuery) Next() protocol.Epoch
func (*EpochQuery) Transition ¶
func (mock *EpochQuery) Transition()
type ExecutionState ¶ added in v0.11.0
type ExecutionState struct { sync.Mutex mock.ExecutionState // contains filtered or unexported fields }
ExecutionState is a mocked version of execution state that simulates some of its behavior for testing purpose
func NewExecutionState ¶ added in v0.11.0
func NewExecutionState(seal *flow.Seal) *ExecutionState
func (*ExecutionState) ExecuteBlock ¶ added in v0.11.0
func (es *ExecutionState) ExecuteBlock(t *testing.T, block *flow.Block)
func (*ExecutionState) PersistStateCommitment ¶ added in v0.11.0
func (es *ExecutionState) PersistStateCommitment(ctx context.Context, blockID flow.Identifier, commit flow.StateCommitment) error
func (*ExecutionState) StateCommitmentByBlockID ¶ added in v0.11.0
func (es *ExecutionState) StateCommitmentByBlockID(ctx context.Context, blockID flow.Identifier) (flow.StateCommitment, error)
type ProtocolState ¶ added in v0.11.0
ProtocolState is a mocked version of protocol state, which has very close behavior to the real implementation but for testing purpose. If you are testing a module that depends on protocol state's behavior, but you don't want to mock up the methods and its return value, then just use this module
func NewProtocolState ¶ added in v0.11.0
func NewProtocolState() *ProtocolState
func (*ProtocolState) AtBlockID ¶ added in v0.11.0
func (ps *ProtocolState) AtBlockID(blockID flow.Identifier) protocol.Snapshot
func (*ProtocolState) AtHeight ¶ added in v0.11.0
func (ps *ProtocolState) AtHeight(height uint64) protocol.Snapshot
func (*ProtocolState) Final ¶ added in v0.11.0
func (ps *ProtocolState) Final() protocol.Snapshot
func (*ProtocolState) Mutate ¶ added in v0.11.0
func (ps *ProtocolState) Mutate() protocol.Mutator
func (*ProtocolState) Params ¶ added in v0.11.0
func (ps *ProtocolState) Params() protocol.Params
type ProtocolStateMutator ¶ added in v0.11.0
type ProtocolStateMutator struct { protocolmock.Mutator // contains filtered or unexported fields }
func (*ProtocolStateMutator) Bootstrap ¶ added in v0.11.0
func (m *ProtocolStateMutator) Bootstrap(root *flow.Block, result *flow.ExecutionResult, seal *flow.Seal) error
func (*ProtocolStateMutator) Extend ¶ added in v0.11.0
func (m *ProtocolStateMutator) Extend(block *flow.Block) error
func (*ProtocolStateMutator) Finalize ¶ added in v0.11.0
func (m *ProtocolStateMutator) Finalize(blockID flow.Identifier) error
Click to show internal directories.
Click to hide internal directories.