Documentation
¶
Index ¶
- type DummyExecutor
- func (e *DummyExecutor) ExecuteTxs(ctx context.Context, txs []types.Tx, blockHeight uint64, timestamp time.Time, ...) (types.Hash, uint64, error)
- func (e *DummyExecutor) GetTxs(context.Context) ([]types.Tx, error)
- func (e *DummyExecutor) InitChain(ctx context.Context, genesisTime time.Time, initialHeight uint64, ...) (types.Hash, uint64, error)
- func (e *DummyExecutor) SetFinal(ctx context.Context, blockHeight uint64) error
- type ExecutorSuite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DummyExecutor ¶
type DummyExecutor struct {
// contains filtered or unexported fields
}
DummyExecutor is a dummy implementation of the DummyExecutor interface for testing
func NewDummyExecutor ¶
func NewDummyExecutor() *DummyExecutor
NewDummyExecutor creates a new dummy DummyExecutor instance
func (*DummyExecutor) ExecuteTxs ¶
func (e *DummyExecutor) ExecuteTxs(ctx context.Context, txs []types.Tx, blockHeight uint64, timestamp time.Time, prevStateRoot types.Hash) (types.Hash, uint64, error)
ExecuteTxs simulate execution of transactions.
func (*DummyExecutor) GetTxs ¶
GetTxs returns the list of transactions (types.Tx) within the DummyExecutor instance and an error if any.
func (*DummyExecutor) InitChain ¶
func (e *DummyExecutor) InitChain(ctx context.Context, genesisTime time.Time, initialHeight uint64, chainID string) (types.Hash, uint64, error)
InitChain initializes the chain state with the given genesis time, initial height, and chain ID. It returns the state root hash, the maximum byte size, and an error if the initialization fails.
type ExecutorSuite ¶
ExecutorSuite is a reusable test suite for Execution API implementations.
func (*ExecutorSuite) TestExecuteTxs ¶
func (s *ExecutorSuite) TestExecuteTxs()
TestExecuteTxs tests ExecuteTxs method.
func (*ExecutorSuite) TestGetTxs ¶
func (s *ExecutorSuite) TestGetTxs()
TestGetTxs tests GetTxs method.
func (*ExecutorSuite) TestInitChain ¶
func (s *ExecutorSuite) TestInitChain()
TestInitChain tests InitChain method.
func (*ExecutorSuite) TestSetFinal ¶
func (s *ExecutorSuite) TestSetFinal()
TestSetFinal tests SetFinal method.