@@ -176,14 +176,14 @@ func (r *registryContractClientImpl) sendRegisterVoter(nextRewardEpochID *big.In
176176 )
177177
178178 if r .chainID != chainIDCoston2 {
179- signature , err = r .createSignatureOld (epochID , address )
179+ signature , err = r .createSignature (epochID , address )
180180 if err != nil {
181181 return fmt .Errorf ("creating registry signature old: %w" , err )
182182 }
183183 } else {
184184 signature , err = r .createSignatureNew (r .chainID , epochID , address )
185185 if err != nil {
186- return fmt .Errorf ("creating pre registry signature new: %w" , err )
186+ return fmt .Errorf ("creating registry signature new: %w" , err )
187187 }
188188 }
189189
@@ -256,9 +256,9 @@ func (r *registryContractClientImpl) sendPreRegisterVoter(nextRewardEpochID *big
256256 )
257257
258258 if r .chainID != chainIDCoston2 {
259- signature , err = r .createSignatureOld (epochID , address )
259+ signature , err = r .createSignature (epochID , address )
260260 if err != nil {
261- return fmt .Errorf ("creating registry signature old: %w" , err )
261+ return fmt .Errorf ("creating pre registry signature old: %w" , err )
262262 }
263263 } else {
264264 signature , err = r .createSignatureNew (r .chainID , epochID , address )
@@ -312,8 +312,8 @@ func (r *registryContractClientImpl) sendPreRegisterVoter(nextRewardEpochID *big
312312 return nil
313313}
314314
315- // createSignatureOld creates ECDSA message signature keccak256(abi.encode(nextRewardEpochID, address)) with signerPrivateKey
316- func (r * registryContractClientImpl ) createSignatureOld (nextRewardEpochID uint32 , address common.Address ) ([]byte , error ) {
315+ // createSignature creates ECDSA message signature keccak256(abi.encode(nextRewardEpochID, address)) with signerPrivateKey
316+ func (r * registryContractClientImpl ) createSignature (nextRewardEpochID uint32 , address common.Address ) ([]byte , error ) {
317317 message , err := registratorArguments .Pack (nextRewardEpochID , address )
318318 if err != nil {
319319 return nil , err
@@ -322,7 +322,7 @@ func (r *registryContractClientImpl) createSignatureOld(nextRewardEpochID uint32
322322 return crypto .Sign (accounts .TextHash (messageHash ), r .signerPrivateKey )
323323}
324324
325- // createSignatureOld creates ECDSA message signature keccak256(abi.encode(chainID, nextRewardEpochID, address)) with signerPrivateKey
325+ // createSignatureNew creates ECDSA message signature keccak256(abi.encode(chainID, nextRewardEpochID, address)) with signerPrivateKey
326326func (r * registryContractClientImpl ) createSignatureNew (chainID int , nextRewardEpochID uint32 , address common.Address ) ([]byte , error ) {
327327 chainIDB := big .NewInt (int64 (chainID ))
328328
0 commit comments