@@ -66,12 +66,16 @@ func (ksh *KeyShareHandler) ConstructDecryptionKeyShares(
66
66
if ! isKeyper {
67
67
return nil , errors .Wrap (ErrNotAKeyper , ErrIgnoreDecryptionRequest .Error ())
68
68
}
69
+ keyperConfigIndex , err := medley .Int64ToUint64Safe (eon .KeyperConfigIndex )
70
+ if err != nil {
71
+ return nil , err
72
+ }
69
73
70
74
// check if we already computed (and therefore most likely sent) our key shares
71
75
allSharesExist := true
72
76
for _ , identityPreimage := range identityPreimages {
73
77
shareExists , err := db .ExistsDecryptionKeyShare (ctx , database.ExistsDecryptionKeyShareParams {
74
- Eon : eon . Eon ,
78
+ Eon : int64 ( keyperConfigIndex ) ,
75
79
EpochID : identityPreimage .Bytes (),
76
80
KeyperIndex : keyperIndex ,
77
81
})
@@ -113,17 +117,13 @@ func (ksh *KeyShareHandler) ConstructDecryptionKeyShares(
113
117
})
114
118
}
115
119
116
- keyperSetIndexUint , err := medley .Int64ToUint64Safe (eon .KeyperConfigIndex )
117
- if err != nil {
118
- return nil , err
119
- }
120
120
keyperIndexUint , err := medley .Int64ToUint64Safe (keyperIndex )
121
121
if err != nil {
122
122
return nil , err
123
123
}
124
124
msg := & p2pmsg.DecryptionKeyShares {
125
125
InstanceID : ksh .InstanceID ,
126
- Eon : keyperSetIndexUint ,
126
+ Eon : keyperConfigIndex ,
127
127
KeyperIndex : keyperIndexUint ,
128
128
Shares : shares ,
129
129
}
0 commit comments