-
Notifications
You must be signed in to change notification settings - Fork 22
/
unknwon_signer.go
34 lines (29 loc) · 1.08 KB
/
unknwon_signer.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 commit
import (
"github.com/bloxapp/ssv-spec/qbft"
"github.com/bloxapp/ssv-spec/qbft/spectest/tests"
"github.com/bloxapp/ssv-spec/types/testingutils"
)
// UnknownSigner tests a single commit received with an unknown signer
func UnknownSigner() tests.SpecTest {
pre := testingutils.BaseInstance()
ks := testingutils.Testing4SharesSet()
msgs := []*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], 5),
}
return &tests.MsgProcessingSpecTest{
Name: "unknown commit signer",
Pre: pre,
PostRoot: "bee2790f72eaeb5dfa15d998817ec0ae09443951aafbb5040f779c2eaa52bc53",
InputMessages: msgs,
ExpectedError: "invalid signed message: signer not in committee",
OutputMessages: []*qbft.SignedMessage{
testingutils.TestingPrepareMessage(ks.Shares[1], 1),
testingutils.TestingCommitMessage(ks.Shares[1], 1),
},
}
}