-
Notifications
You must be signed in to change notification settings - Fork 21
/
create_proposal_prev_prepared.go
29 lines (27 loc) · 1.21 KB
/
create_proposal_prev_prepared.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
package messages
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"
)
// CreateProposalPreviouslyPrepared tests creating a proposal msg,previously prepared
func CreateProposalPreviouslyPrepared() tests.SpecTest {
ks := testingutils.Testing4SharesSet()
return &tests.CreateMsgSpecTest{
CreateType: tests.CreateProposal,
Name: "create proposal previously prepared",
Value: [32]byte{1, 2, 3, 4},
RoundChangeJustifications: []*qbft.SignedMessage{
testingutils.TestingRoundChangeMessageWithRound(ks.Shares[1], types.OperatorID(1), 2),
testingutils.TestingRoundChangeMessageWithRound(ks.Shares[2], types.OperatorID(2), 2),
testingutils.TestingRoundChangeMessageWithRound(ks.Shares[3], types.OperatorID(3), 2),
},
PrepareJustifications: []*qbft.SignedMessage{
testingutils.TestingPrepareMessage(ks.Shares[1], types.OperatorID(1)),
testingutils.TestingPrepareMessage(ks.Shares[2], types.OperatorID(2)),
testingutils.TestingPrepareMessage(ks.Shares[3], types.OperatorID(3)),
},
ExpectedRoot: "282dd7899470e882fc22e9284628f4c25b2e3ba89bc0f50becb677c9a2e4708c",
}
}