-
Notifications
You must be signed in to change notification settings - Fork 21
/
ten_operators.go
43 lines (38 loc) · 1.82 KB
/
ten_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
package tests
import (
"github.com/bloxapp/ssv-spec/qbft"
"github.com/bloxapp/ssv-spec/types"
"github.com/bloxapp/ssv-spec/types/testingutils"
)
// TenOperators tests a simple full happy flow until decided
func TenOperators() SpecTest {
pre := testingutils.TenOperatorsInstance()
ks := testingutils.Testing10SharesSet()
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.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)),
}
return &MsgProcessingSpecTest{
Name: "happy flow ten operators",
Pre: pre,
PostRoot: "9f295e9f4994601c3358183740bb45526402b01d158781484c7dcf6cdaa91357",
InputMessages: msgs,
OutputMessages: []*qbft.SignedMessage{
testingutils.TestingPrepareMessage(ks.Shares[1], types.OperatorID(1)),
testingutils.TestingCommitMessage(ks.Shares[1], types.OperatorID(1)),
},
}
}