@@ -28,13 +28,13 @@ func TestHandleDecryptionKeyIntegration(t *testing.T) {
28
28
29
29
queries := database .New (dbpool )
30
30
31
- eon := config .GetEon ()
32
31
identityPreimages := []identitypreimage.IdentityPreimage {}
33
32
for i := 0 ; i < 3 ; i ++ {
34
33
identityPreimage := identitypreimage .Uint64ToIdentityPreimage (uint64 (i ))
35
34
identityPreimages = append (identityPreimages , identityPreimage )
36
35
}
37
36
keyperIndex := uint64 (1 )
37
+ keyperConfigIndex := uint64 (1 )
38
38
39
39
tkg := testsetup .InitializeEon (ctx , t , dbpool , config , keyperIndex )
40
40
@@ -56,13 +56,13 @@ func TestHandleDecryptionKeyIntegration(t *testing.T) {
56
56
}
57
57
msgs := p2ptest .MustHandleMessage (t , handler , ctx , & p2pmsg.DecryptionKeys {
58
58
InstanceID : config .GetInstanceID (),
59
- Eon : eon ,
59
+ Eon : keyperConfigIndex ,
60
60
Keys : keys ,
61
61
})
62
62
assert .Check (t , len (msgs ) == 0 )
63
63
for i , identityPreimage := range identityPreimages {
64
64
key , err := queries .GetDecryptionKey (ctx , database.GetDecryptionKeyParams {
65
- Eon : int64 (eon ),
65
+ Eon : int64 (keyperConfigIndex ),
66
66
EpochID : identityPreimage .Bytes (),
67
67
})
68
68
assert .NilError (t , err )
@@ -80,7 +80,7 @@ func TestDecryptionKeyValidatorIntegration(t *testing.T) {
80
80
t .Cleanup (dbclose )
81
81
82
82
keyperIndex := uint64 (1 )
83
- eon := config . GetEon ( )
83
+ keyperConfigIndex := uint64 ( 1 )
84
84
identityPreimage := identitypreimage .BigToIdentityPreimage (common .Big0 )
85
85
secondIdentityPreimage := identitypreimage .BigToIdentityPreimage (common .Big1 )
86
86
wrongIdentityPreimage := identitypreimage .BigToIdentityPreimage (common .Big2 )
@@ -99,7 +99,7 @@ func TestDecryptionKeyValidatorIntegration(t *testing.T) {
99
99
validationResult : pubsub .ValidationAccept ,
100
100
msg : & p2pmsg.DecryptionKeys {
101
101
InstanceID : config .GetInstanceID (),
102
- Eon : eon ,
102
+ Eon : keyperConfigIndex ,
103
103
Keys : []* p2pmsg.Key {
104
104
{
105
105
Identity : identityPreimage .Bytes (),
@@ -113,7 +113,7 @@ func TestDecryptionKeyValidatorIntegration(t *testing.T) {
113
113
validationResult : pubsub .ValidationReject ,
114
114
msg : & p2pmsg.DecryptionKeys {
115
115
InstanceID : config .GetInstanceID (),
116
- Eon : eon ,
116
+ Eon : keyperConfigIndex ,
117
117
Keys : []* p2pmsg.Key {
118
118
{
119
119
Identity : wrongIdentityPreimage .Bytes (),
@@ -127,7 +127,7 @@ func TestDecryptionKeyValidatorIntegration(t *testing.T) {
127
127
validationResult : pubsub .ValidationReject ,
128
128
msg : & p2pmsg.DecryptionKeys {
129
129
InstanceID : config .GetInstanceID () + 1 ,
130
- Eon : eon ,
130
+ Eon : keyperConfigIndex ,
131
131
Keys : []* p2pmsg.Key {
132
132
{
133
133
Identity : identityPreimage .Bytes (),
@@ -141,34 +141,16 @@ func TestDecryptionKeyValidatorIntegration(t *testing.T) {
141
141
validationResult : pubsub .ValidationReject ,
142
142
msg : & p2pmsg.DecryptionKeys {
143
143
InstanceID : config .GetInstanceID (),
144
- Eon : eon ,
144
+ Eon : keyperConfigIndex ,
145
145
Keys : []* p2pmsg.Key {},
146
146
},
147
147
},
148
- {
149
- name : "invalid decryption key duplicate" ,
150
- validationResult : pubsub .ValidationReject ,
151
- msg : & p2pmsg.DecryptionKeys {
152
- InstanceID : config .GetInstanceID (),
153
- Eon : eon ,
154
- Keys : []* p2pmsg.Key {
155
- {
156
- Identity : identityPreimage .Bytes (),
157
- Key : secretKey ,
158
- },
159
- {
160
- Identity : identityPreimage .Bytes (),
161
- Key : secretKey ,
162
- },
163
- },
164
- },
165
- },
166
148
{
167
149
name : "invalid decryption key unordered" ,
168
150
validationResult : pubsub .ValidationReject ,
169
151
msg : & p2pmsg.DecryptionKeys {
170
152
InstanceID : config .GetInstanceID (),
171
- Eon : eon ,
153
+ Eon : keyperConfigIndex ,
172
154
Keys : []* p2pmsg.Key {
173
155
{
174
156
Identity : secondIdentityPreimage .Bytes (),
0 commit comments