Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
fixed concurrent access
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikelle committed Apr 5, 2024
1 parent 49546a0 commit 8be8126
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/signer/preconfencryptor/encryptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ func (e *encryptor) VerifyBid(bid *preconfpb.Bid) (*common.Address, error) {

func (e *encryptor) DecryptBidData(bidderAddress common.Address, bid *preconfpb.EncryptedBid) (*preconfpb.Bid, error) {
pkk := e.keyKeeper.(*keykeeper.ProviderKeyKeeper)
aesKey := pkk.BiddersAESKeys[bidderAddress]
aesKey, exists := pkk.GetAESKey(bidderAddress)
if !exists {
return nil, errors.New("no AES key found for bidder")
}
decryptedBytes, err := keykeeper.DecryptWithAESGCM(aesKey, bid.Ciphertext)
if err != nil {
return nil, err
Expand Down

0 comments on commit 8be8126

Please sign in to comment.