-
Notifications
You must be signed in to change notification settings - Fork 22
/
current_instance_future_round.go
38 lines (34 loc) · 1.36 KB
/
current_instance_future_round.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
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"
)
// CurrentInstanceFutureRound tests a decided msg received for current running instance for a future round
func CurrentInstanceFutureRound() tests.SpecTest {
ks := testingutils.Testing4SharesSet()
return &tests.ControllerSpecTest{
Name: "decide current instance future round",
RunInstanceData: []*tests.RunInstanceData{
{
InputValue: []byte{1, 2, 3, 4},
InputMessages: []*qbft.SignedMessage{
testingutils.TestingProposalMessage(ks.Shares[1], 1),
testingutils.TestingPrepareMessage(ks.Shares[1], 1),
testingutils.TestingPrepareMessage(ks.Shares[2], 2),
testingutils.TestingPrepareMessage(ks.Shares[3], 3),
testingutils.TestingCommitMessage(ks.Shares[1], 1),
testingutils.TestingCommitMessage(ks.Shares[2], 2),
testingutils.TestingCommitMultiSignerMessageWithRound([]*bls.SecretKey{ks.Shares[1], ks.Shares[2], ks.Shares[3]}, []types.OperatorID{1, 2, 3}, 50),
},
ExpectedDecidedState: tests.DecidedState{
DecidedCnt: 1,
DecidedVal: testingutils.TestingQBFTFullData,
},
ControllerPostRoot: "22a652c6cf6e1243c2a82a72c31ae733e614e5f886e700acaa81210f04659664",
},
},
}
}