Documentation ¶
Index ¶
- func ChangeRoundMsg(t *testing.T, sk *bls.SecretKey, lambda []byte, round, id uint64) *proto.SignedMessage
- func ChangeRoundMsgWithPrepared(t *testing.T, sk *bls.SecretKey, lambda, preparedValue []byte, ...) *proto.SignedMessage
- func CommitMsg(t *testing.T, sk *bls.SecretKey, lambda, inputValue []byte, round, id uint64) *proto.SignedMessage
- func PrePrepareMsg(t *testing.T, sk *bls.SecretKey, lambda, inputValue []byte, round, id uint64) *proto.SignedMessage
- func PrepareMsg(t *testing.T, sk *bls.SecretKey, lambda, inputValue []byte, round, id uint64) *proto.SignedMessage
- func RequireReturnedFalseNoError(t *testing.T, f func() (bool, error))
- func RequireReturnedTrueNoError(t *testing.T, f func() (bool, error))
- func RequireReturnedTrueWithError(t *testing.T, f func() (bool, error), errStr string)
- func SignMsg(t *testing.T, id uint64, sk *bls.SecretKey, msg *proto.Message) *proto.SignedMessage
- func SimulateTimeout(instance *ibft.Instance, toRound uint64)
- func TestIBFTInstance(t *testing.T, lambda []byte) *ibft.Instance
- func TestInputValue() []byte
- func TestNodes() map[uint64]*proto.Node
- func TestPKs() [][]byte
- func TestSKs() []*bls.SecretKey
- func TestShares() map[uint64]*storage.Share
- func TestValidatorPK() *bls.PublicKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeRoundMsg ¶
func ChangeRoundMsg(t *testing.T, sk *bls.SecretKey, lambda []byte, round, id uint64) *proto.SignedMessage
ChangeRoundMsg constructs and signs a change round msg
func ChangeRoundMsgWithPrepared ¶
func ChangeRoundMsgWithPrepared(t *testing.T, sk *bls.SecretKey, lambda, preparedValue []byte, signers map[uint64]*bls.SecretKey, round, preparedRound, id uint64) *proto.SignedMessage
ChangeRoundMsgWithPrepared constructs and signs a change round msg
func CommitMsg ¶
func CommitMsg(t *testing.T, sk *bls.SecretKey, lambda, inputValue []byte, round, id uint64) *proto.SignedMessage
CommitMsg constructs and signs a commit msg
func PrePrepareMsg ¶
func PrePrepareMsg(t *testing.T, sk *bls.SecretKey, lambda, inputValue []byte, round, id uint64) *proto.SignedMessage
PrePrepareMsg constructs and signs a pre-prepare msg
func PrepareMsg ¶
func PrepareMsg(t *testing.T, sk *bls.SecretKey, lambda, inputValue []byte, round, id uint64) *proto.SignedMessage
PrepareMsg constructs and signs a prepare msg
func RequireReturnedFalseNoError ¶ added in v0.0.6
RequireReturnedFalseNoError will call ProcessMessage and verifies it returns false and nil for execution
func RequireReturnedTrueNoError ¶ added in v0.0.6
RequireReturnedTrueNoError will call ProcessMessage and verifies it returns true and nil for execution
func RequireReturnedTrueWithError ¶ added in v0.0.6
RequireReturnedTrueWithError will call ProcessMessage and verifies it returns true and error for execution
func SimulateTimeout ¶
SimulateTimeout simulates instance timeout
func TestIBFTInstance ¶
TestIBFTInstance returns a test iBFT instance
func TestShares ¶
TestShares generates test nodes for SSV
func TestValidatorPK ¶
TestValidatorPK returns ref validator pk
Types ¶
This section is empty.