Documentation ¶
Index ¶
- func ErrorHandling(t *testing.T, expectedError string, lastErr error)
- func GetControllerRoot(t *testing.T, c *controller.Controller, storedInstances []instance.Instancer) ([]byte, error)
- func MapToSpecInstance(t *testing.T, identifier []byte, qbftInstance instance.Instancer, ...) *qbft2.Instance
- func NewController(ctx context.Context, t *testing.T, logger *zap.Logger, ...) *controller.Controller
- func NewQBFTStorage(ctx context.Context, t *testing.T, logger *zap.Logger, role string) (basedb.IDb, qbftstorage.QBFTStore)
- func NewQbftInstance(logger *zap.Logger, qbftStorage qbftstorage.QBFTStore, ...) instance.Instancer
- func RunControllerSpecTest(t *testing.T, test *spectests.ControllerSpecTest)
- func RunCreateMessageSpecTest(t *testing.T, test *spectests.CreateMsgSpecTest)
- func RunMsgProcessingSpecTest(t *testing.T, test *spectests.MsgProcessingSpecTest)
- func RunMsgSpecTest(t *testing.T, test *spectests.MsgSpecTest)
- func ToMappedShare(t *testing.T, share *types.Share) (*beacon.Share, *testingutils.TestKeySet)
- type BroadcastMessagesGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorHandling ¶
ErrorHandling by spec with error mapping
func GetControllerRoot ¶
func GetControllerRoot(t *testing.T, c *controller.Controller, storedInstances []instance.Instancer) ([]byte, error)
GetControllerRoot return controller root by spec
func MapToSpecInstance ¶
func MapToSpecInstance(t *testing.T, identifier []byte, qbftInstance instance.Instancer, instanceShare *beacon.Share) *qbft2.Instance
MapToSpecInstance mapping instance to spec instance struct
func NewController ¶
func NewController(ctx context.Context, t *testing.T, logger *zap.Logger, identifier types.MessageID, s qbftstorage.QBFTStore, share *beacon.Share, net protcolp2p.MockNetwork, beacon *validator.TestBeacon, version forksprotocol.ForkVersion) *controller.Controller
NewController returns new qbft controller
func NewQBFTStorage ¶
func NewQBFTStorage(ctx context.Context, t *testing.T, logger *zap.Logger, role string) (basedb.IDb, qbftstorage.QBFTStore)
NewQBFTStorage returns qbft storage and db
func NewQbftInstance ¶
func NewQbftInstance(logger *zap.Logger, qbftStorage qbftstorage.QBFTStore, net protcolp2p.MockNetwork, beacon *validator.TestBeacon, share *beacon.Share, identifier []byte, forkVersion forksprotocol.ForkVersion) instance.Instancer
NewQbftInstance returns new qbft instance
func RunControllerSpecTest ¶
func RunControllerSpecTest(t *testing.T, test *spectests.ControllerSpecTest)
RunControllerSpecTest runs spec test type ControllerSpecTest
func RunCreateMessageSpecTest ¶
func RunCreateMessageSpecTest(t *testing.T, test *spectests.CreateMsgSpecTest)
RunCreateMessageSpecTest runs spec test type CreateMsgSpecTest
func RunMsgProcessingSpecTest ¶
func RunMsgProcessingSpecTest(t *testing.T, test *spectests.MsgProcessingSpecTest)
RunMsgProcessingSpecTest for spec test type MsgProcessingSpecTest
func RunMsgSpecTest ¶
func RunMsgSpecTest(t *testing.T, test *spectests.MsgSpecTest)
RunMsgSpecTest runs spec test type MsgSpecTest
func ToMappedShare ¶
func ToMappedShare(t *testing.T, share *types.Share) (*beacon.Share, *testingutils.TestKeySet)
ToMappedShare convert spec share to ssv share
Types ¶
type BroadcastMessagesGetter ¶
type BroadcastMessagesGetter interface { GetBroadcastMessages() []types.SSVMessage CalledDecidedSyncCnt() int SetCalledDecidedSyncCnt(int) // temp solution to pass spec test }
BroadcastMessagesGetter interface to support spec tests
Click to show internal directories.
Click to hide internal directories.