@@ -32,6 +32,7 @@ func TestHandleDecryptionKeyShareIntegration(t *testing.T) {
32
32
identityPreimages = append (identityPreimages , identityPreimage )
33
33
}
34
34
keyperIndex := uint64 (1 )
35
+ keyperConfigIndex := uint64 (1 )
35
36
36
37
tkg := testsetup .InitializeEon (ctx , t , dbpool , config , keyperIndex )
37
38
var handler p2p.MessageHandler = & DecryptionKeyShareHandler {config : config , dbpool : dbpool }
@@ -52,7 +53,7 @@ func TestHandleDecryptionKeyShareIntegration(t *testing.T) {
52
53
}
53
54
msgs := p2ptest .MustHandleMessage (t , handler , ctx , & p2pmsg.DecryptionKeyShares {
54
55
InstanceID : config .GetInstanceID (),
55
- Eon : config . GetEon () ,
56
+ Eon : keyperConfigIndex ,
56
57
KeyperIndex : 0 ,
57
58
Shares : shares ,
58
59
})
@@ -70,7 +71,7 @@ func TestHandleDecryptionKeyShareIntegration(t *testing.T) {
70
71
}
71
72
msgs = p2ptest .MustHandleMessage (t , handler , ctx , & p2pmsg.DecryptionKeyShares {
72
73
InstanceID : config .GetInstanceID (),
73
- Eon : config . GetEon () ,
74
+ Eon : keyperConfigIndex ,
74
75
KeyperIndex : 2 ,
75
76
Shares : shares ,
76
77
})
@@ -96,7 +97,7 @@ func TestDecryptionKeyshareValidatorIntegration(t *testing.T) {
96
97
t .Cleanup (dbclose )
97
98
98
99
keyperIndex := uint64 (1 )
99
- eon := config . GetEon ( )
100
+ keyperConfigIndex := uint64 ( 1 )
100
101
identityPreimage := identitypreimage .BigToIdentityPreimage (common .Big0 )
101
102
secondIdentityPreimage := identitypreimage .BigToIdentityPreimage (common .Big1 )
102
103
wrongIdentityPreimage := identitypreimage .BigToIdentityPreimage (common .Big2 )
@@ -115,7 +116,7 @@ func TestDecryptionKeyshareValidatorIntegration(t *testing.T) {
115
116
validationResult : pubsub .ValidationAccept ,
116
117
msg : & p2pmsg.DecryptionKeyShares {
117
118
InstanceID : config .GetInstanceID (),
118
- Eon : eon ,
119
+ Eon : keyperConfigIndex ,
119
120
KeyperIndex : keyperIndex ,
120
121
Shares : []* p2pmsg.KeyShare {
121
122
{
@@ -134,7 +135,7 @@ func TestDecryptionKeyshareValidatorIntegration(t *testing.T) {
134
135
validationResult : pubsub .ValidationReject ,
135
136
msg : & p2pmsg.DecryptionKeyShares {
136
137
InstanceID : config .GetInstanceID (),
137
- Eon : eon ,
138
+ Eon : keyperConfigIndex ,
138
139
KeyperIndex : keyperIndex ,
139
140
Shares : []* p2pmsg.KeyShare {
140
141
{
@@ -149,7 +150,7 @@ func TestDecryptionKeyshareValidatorIntegration(t *testing.T) {
149
150
validationResult : pubsub .ValidationReject ,
150
151
msg : & p2pmsg.DecryptionKeyShares {
151
152
InstanceID : config .GetInstanceID () + 1 ,
152
- Eon : eon ,
153
+ Eon : keyperConfigIndex ,
153
154
KeyperIndex : keyperIndex ,
154
155
Shares : []* p2pmsg.KeyShare {
155
156
{
@@ -164,7 +165,7 @@ func TestDecryptionKeyshareValidatorIntegration(t *testing.T) {
164
165
validationResult : pubsub .ValidationReject ,
165
166
msg : & p2pmsg.DecryptionKeyShares {
166
167
InstanceID : config .GetInstanceID (),
167
- Eon : eon ,
168
+ Eon : keyperConfigIndex ,
168
169
KeyperIndex : keyperIndex + 1 ,
169
170
Shares : []* p2pmsg.KeyShare {
170
171
{
@@ -179,36 +180,17 @@ func TestDecryptionKeyshareValidatorIntegration(t *testing.T) {
179
180
validationResult : pubsub .ValidationReject ,
180
181
msg : & p2pmsg.DecryptionKeyShares {
181
182
InstanceID : config .GetInstanceID (),
182
- Eon : eon ,
183
+ Eon : keyperConfigIndex ,
183
184
KeyperIndex : keyperIndex ,
184
185
Shares : []* p2pmsg.KeyShare {},
185
186
},
186
187
},
187
- {
188
- name : "invalid decryption key share duplicate" ,
189
- validationResult : pubsub .ValidationReject ,
190
- msg : & p2pmsg.DecryptionKeyShares {
191
- InstanceID : config .GetInstanceID (),
192
- Eon : eon ,
193
- KeyperIndex : keyperIndex ,
194
- Shares : []* p2pmsg.KeyShare {
195
- {
196
- EpochID : identityPreimage .Bytes (),
197
- Share : keyshare ,
198
- },
199
- {
200
- EpochID : identityPreimage .Bytes (),
201
- Share : keyshare ,
202
- },
203
- },
204
- },
205
- },
206
188
{
207
189
name : "invalid decryption key share unordered" ,
208
190
validationResult : pubsub .ValidationReject ,
209
191
msg : & p2pmsg.DecryptionKeyShares {
210
192
InstanceID : config .GetInstanceID (),
211
- Eon : eon ,
193
+ Eon : keyperConfigIndex ,
212
194
KeyperIndex : keyperIndex ,
213
195
Shares : []* p2pmsg.KeyShare {
214
196
{
0 commit comments