forked from ssvlabs/ssv-spec
-
Notifications
You must be signed in to change notification settings - Fork 1
/
force_stop.go
29 lines (24 loc) · 930 Bytes
/
force_stop.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package commit
import (
"github.com/ssvlabs/ssv-spec-pre-cc/qbft"
"github.com/ssvlabs/ssv-spec-pre-cc/qbft/spectest/tests"
"github.com/ssvlabs/ssv-spec-pre-cc/types"
"github.com/ssvlabs/ssv-spec-pre-cc/types/testingutils"
)
// ForceStop tests processing a commit msg when instance force stopped
func ForceStop() tests.SpecTest {
ks := testingutils.Testing4SharesSet()
pre := testingutils.BaseInstance()
pre.State.ProposalAcceptedForCurrentRound = testingutils.TestingProposalMessage(ks.Shares[1], types.OperatorID(1))
pre.ForceStop()
msgs := []*qbft.SignedMessage{
testingutils.TestingCommitMessage(ks.Shares[1], types.OperatorID(1)),
}
return &tests.MsgProcessingSpecTest{
Name: "force stop commit message",
Pre: pre,
PostRoot: "470d1a88e97b20eafb08ad9682c10642de27515fff7a8ef3c2d2e97953432357",
InputMessages: msgs,
ExpectedError: "instance stopped processing messages",
}
}