-
Notifications
You must be signed in to change notification settings - Fork 20
/
future_instance.go
30 lines (28 loc) · 998 Bytes
/
future_instance.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
package decided
import (
"github.com/bloxapp/ssv-spec/qbft"
"github.com/bloxapp/ssv-spec/qbft/spectest/tests"
"github.com/bloxapp/ssv-spec/types"
"github.com/bloxapp/ssv-spec/types/testingutils"
"github.com/herumi/bls-eth-go-binary/bls"
)
// FutureInstance tests decided msg received for future (not yet started) instance
func FutureInstance() tests.SpecTest {
ks := testingutils.Testing4SharesSet()
return &tests.ControllerSpecTest{
Name: "decide future instance",
RunInstanceData: []*tests.RunInstanceData{
{
InputValue: []byte{1, 2, 3, 4},
InputMessages: []*qbft.SignedMessage{
testingutils.TestingCommitMultiSignerMessageWithHeight([]*bls.SecretKey{ks.Shares[1], ks.Shares[2], ks.Shares[3]}, []types.OperatorID{1, 2, 3}, 10),
},
ExpectedDecidedState: tests.DecidedState{
DecidedCnt: 1,
DecidedVal: testingutils.TestingQBFTFullData,
},
ControllerPostRoot: "589b0c0352f1c22875246f2e66530d5fda62f646434b250ade128c61c16f47bd",
},
},
}
}