-
Notifications
You must be signed in to change notification settings - Fork 21
/
thirteen_operators.go
47 lines (42 loc) · 2.12 KB
/
thirteen_operators.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package tests
import (
"github.com/bloxapp/ssv-spec/qbft"
"github.com/bloxapp/ssv-spec/types"
"github.com/bloxapp/ssv-spec/types/testingutils"
)
// ThirteenOperators tests a simple full happy flow until decided
func ThirteenOperators() SpecTest {
pre := testingutils.ThirteenOperatorsInstance()
ks := testingutils.Testing13SharesSet()
msgs := []*qbft.SignedMessage{
testingutils.TestingProposalMessage(ks.Shares[1], types.OperatorID(1)),
testingutils.TestingPrepareMessage(ks.Shares[1], types.OperatorID(1)),
testingutils.TestingPrepareMessage(ks.Shares[2], types.OperatorID(2)),
testingutils.TestingPrepareMessage(ks.Shares[3], types.OperatorID(3)),
testingutils.TestingPrepareMessage(ks.Shares[4], types.OperatorID(4)),
testingutils.TestingPrepareMessage(ks.Shares[5], types.OperatorID(5)),
testingutils.TestingPrepareMessage(ks.Shares[6], types.OperatorID(6)),
testingutils.TestingPrepareMessage(ks.Shares[7], types.OperatorID(7)),
testingutils.TestingPrepareMessage(ks.Shares[8], types.OperatorID(8)),
testingutils.TestingPrepareMessage(ks.Shares[9], types.OperatorID(9)),
testingutils.TestingCommitMessage(ks.Shares[1], types.OperatorID(1)),
testingutils.TestingCommitMessage(ks.Shares[2], types.OperatorID(2)),
testingutils.TestingCommitMessage(ks.Shares[3], types.OperatorID(3)),
testingutils.TestingCommitMessage(ks.Shares[4], types.OperatorID(4)),
testingutils.TestingCommitMessage(ks.Shares[5], types.OperatorID(5)),
testingutils.TestingCommitMessage(ks.Shares[6], types.OperatorID(6)),
testingutils.TestingCommitMessage(ks.Shares[7], types.OperatorID(7)),
testingutils.TestingCommitMessage(ks.Shares[8], types.OperatorID(8)),
testingutils.TestingCommitMessage(ks.Shares[9], types.OperatorID(9)),
}
return &MsgProcessingSpecTest{
Name: "happy flow thirteen operators",
Pre: pre,
PostRoot: "9479293587bb018ef2e8ed4eb9b86ed1b7a1a1c1f3cb017a41c4896d87f07082",
InputMessages: msgs,
OutputMessages: []*qbft.SignedMessage{
testingutils.TestingPrepareMessage(ks.Shares[1], types.OperatorID(1)),
testingutils.TestingCommitMessage(ks.Shares[1], types.OperatorID(1)),
},
}
}