Documentation
¶
Index ¶
- func CheckForChainFork(ctx context.Context, chain system.L2Chain, logger log.Logger) (func() error, error)
- func InteropSystemTest(t BasicT, f InteropSystemTestFunc, validators ...PreconditionValidator)
- func SystemTest(t BasicT, f SystemTestFunc, validators ...PreconditionValidator)
- type BasicT
- type HeaderProvider
- type InteropSystemTestFunc
- type MultiClient
- type PreconditionError
- type PreconditionValidator
- type SystemAcquirer
- type SystemTestFunc
- type T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckForChainFork ¶ added in v1.13.0
func CheckForChainFork(ctx context.Context, chain system.L2Chain, logger log.Logger) (func() error, error)
CheckForChainFork checks that the L2 chain has not forked now, and returns a function that check again (to be called at the end of the test). An error is returned from this function (and the returned function) if a chain fork has been detected.
func InteropSystemTest ¶
func InteropSystemTest(t BasicT, f InteropSystemTestFunc, validators ...PreconditionValidator)
InteropSystemTest delegates to the default helper
func SystemTest ¶
func SystemTest(t BasicT, f SystemTestFunc, validators ...PreconditionValidator)
SystemTest delegates to the default helper
Types ¶
type HeaderProvider ¶ added in v1.13.0
type InteropSystemTestFunc ¶
type InteropSystemTestFunc func(t T, sys system.InteropSystem)
type MultiClient ¶ added in v1.13.0
type MultiClient struct {
// contains filtered or unexported fields
}
MultiClient is a simple client that checks hash consistency between underlying clients
func NewMultiClient ¶ added in v1.13.0
func NewMultiClient(clients []HeaderProvider) *MultiClient
NewMultiClient creates a new MultiClient with the specified underlying clients
func (*MultiClient) BlockByNumber ¶ added in v1.13.0
BlockByNumber returns a block from the first client while verifying hash consistency
func (*MultiClient) Close ¶ added in v1.13.0
func (mc *MultiClient) Close()
Close closes all underlying client connections
func (*MultiClient) HeaderByNumber ¶ added in v1.13.0
HeaderByNumber returns a header from the first client while verifying hash consistency
type PreconditionError ¶
type PreconditionError struct {
// contains filtered or unexported fields
}
PreconditionError represents an error that occurs when a test precondition is not met
func (*PreconditionError) Error ¶
func (e *PreconditionError) Error() string
func (*PreconditionError) Unwrap ¶
func (e *PreconditionError) Unwrap() error
type PreconditionValidator ¶
type SystemAcquirer ¶ added in v1.11.1
SystemAcquirer attempts to create a System instance. Returns (nil, nil) to indicate this acquirer should be skipped (e.g., when prerequisites are not met). Any other result indicates this acquirer was selected and its result (success or failure) should be used.