-
Notifications
You must be signed in to change notification settings - Fork 20
/
no_rc_justification.go
34 lines (30 loc) · 1.22 KB
/
no_rc_justification.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
package proposal
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"
)
// NoRCJustification tests a proposal for > 1 round, not prepared previously but without quorum of round change msgs justification
func NoRCJustification() tests.SpecTest {
pre := testingutils.BaseInstance()
ks := testingutils.Testing4SharesSet()
rcMsgs := []*qbft.SignedMessage{
testingutils.TestingRoundChangeMessageWithRound(ks.Shares[1], types.OperatorID(1), 2),
testingutils.TestingRoundChangeMessageWithRound(ks.Shares[2], types.OperatorID(2), 2),
}
msgs := []*qbft.SignedMessage{
testingutils.TestingProposalMessageWithParams(ks.Shares[1], types.OperatorID(1), 2, qbft.FirstHeight,
testingutils.TestingQBFTRootData,
testingutils.MarshalJustifications(rcMsgs), nil,
),
}
return &tests.MsgProcessingSpecTest{
Name: "no rc quorum",
Pre: pre,
PostRoot: "eaa7264b5d6f05cfcdec3158fcae4ff58c3de1e7e9e12bd876177a58686994d4",
InputMessages: msgs,
OutputMessages: []*qbft.SignedMessage{},
ExpectedError: "invalid signed message: proposal not justified: change round has no quorum",
}
}