forked from ssvlabs/ssv-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wrong_height.go
30 lines (28 loc) · 1.05 KB
/
wrong_height.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 proposal
import (
"github.com/MatheusFranco99/ssv-spec-AleaBFT/alea"
"github.com/MatheusFranco99/ssv-spec-AleaBFT/alea/spectest/tests"
"github.com/MatheusFranco99/ssv-spec-AleaBFT/types"
"github.com/MatheusFranco99/ssv-spec-AleaBFT/types/testingutils"
)
// WrongHeight tests a proposal msg received with the wrong height
func WrongHeight() *tests.MsgProcessingSpecTest {
pre := testingutils.BaseInstanceAlea()
msgs := []*alea.SignedMessage{
testingutils.SignAleaMsg(testingutils.Testing4SharesSet().Shares[1], types.OperatorID(1), &alea.Message{
MsgType: alea.ProposalMsgType,
Height: 2,
Round: alea.FirstRound,
Identifier: []byte{1, 2, 3, 4},
Data: testingutils.ProposalDataBytes([]byte{1, 2, 3, 4}, nil, nil),
}),
}
return &tests.MsgProcessingSpecTest{
Name: "wrong proposal height",
Pre: pre,
PostRoot: "d0669999d2f4f17dd4888e9602362eb73a7c961e8090c5e5ea2e5e6d5608e9cd",
InputMessages: msgs,
ExpectedError: "invalid signed message: wrong msg height",
DontRunAC: true,
}
}