newduty

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsensusNotStarted

func ConsensusNotStarted() tests.SpecTest

ConsensusNotStarted tests starting duty after prev already started but for some duties' consensus didn't start because pre-consensus didnt get quorum (different duties will enable starting a new duty)

func DuplicateDutyFinished added in v0.3.1

func DuplicateDutyFinished() tests.SpecTest

DuplicateDutyFinished is a test that runs the following scenario:

  • Runner is assigned a duty
  • Runner finishes the duty
  • Runner is assigned the same duty again

func DuplicateDutyNotFinished added in v0.3.1

func DuplicateDutyNotFinished() tests.SpecTest

DuplicateDutyNotFinished is a test that runs the following scenario: - Runner is assigned a duty - Runner doesn't finish the duty - Runner is assigned the same duty again

func Finished

func Finished() tests.SpecTest

Finished tests a valid start duty after finished prev

func NotDecided

func NotDecided() tests.SpecTest

NotDecided tests starting duty before finished or decided

func PostDecided

func PostDecided() tests.SpecTest

PostDecided tests a valid start duty before finished and after decided of another duty. Duties that have a preconsensus phase won't update the `currentRunningInstance`.

func PostFutureDecided added in v0.3.0

func PostFutureDecided() tests.SpecTest

PostFutureDecided tests starting duty after a future decided This can happen if we receive a future decided message from the network and we are behind.

func PostInvalidDecided

func PostInvalidDecided() tests.SpecTest

PostInvalidDecided tests starting a new duty after prev was decided with an invalid decided value

func PostWrongDecided

func PostWrongDecided() tests.SpecTest

PostWrongDecided tests starting a new duty after prev was decided wrongly (future decided) This can happen if we receive a future decided message from the network.

func Valid

func Valid() tests.SpecTest

Valid tests a valid start duty

Types

type MultiStartNewRunnerDutySpecTest

type MultiStartNewRunnerDutySpecTest struct {
	Name  string
	Tests []*StartNewRunnerDutySpecTest
}

func (*MultiStartNewRunnerDutySpecTest) GetPostState added in v0.3.1

func (tests *MultiStartNewRunnerDutySpecTest) GetPostState() (interface{}, error)

func (*MultiStartNewRunnerDutySpecTest) Run

func (tests *MultiStartNewRunnerDutySpecTest) Run(t *testing.T)

func (*MultiStartNewRunnerDutySpecTest) TestName

func (tests *MultiStartNewRunnerDutySpecTest) TestName() string

type StartNewRunnerDutySpecTest

type StartNewRunnerDutySpecTest struct {
	Name                    string
	Runner                  ssv.Runner
	Duty                    *types.Duty
	PostDutyRunnerStateRoot string
	PostDutyRunnerState     types.Root `json:"-"` // Field is ignored by encoding/json
	OutputMessages          []*types.SignedPartialSignatureMessage
	ExpectedError           string
}

func (*StartNewRunnerDutySpecTest) GetPostState added in v0.3.1

func (test *StartNewRunnerDutySpecTest) GetPostState() (interface{}, error)

func (*StartNewRunnerDutySpecTest) Run

func (test *StartNewRunnerDutySpecTest) Run(t *testing.T)

func (*StartNewRunnerDutySpecTest) RunAsPartOfMultiTest added in v0.3.1

func (test *StartNewRunnerDutySpecTest) RunAsPartOfMultiTest(t *testing.T)

RunAsPartOfMultiTest runs the test as part of a MultiMsgProcessingSpecTest. It simply runs without calling oveerideStateComparison

func (*StartNewRunnerDutySpecTest) TestName

func (test *StartNewRunnerDutySpecTest) TestName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL