Skip to content

Commit

Permalink
core/services/keystore: *memoryORM.saveEncryptedKeyRing - handle call…
Browse files Browse the repository at this point in the history
…back errors (#10958)
  • Loading branch information
jmank88 authored Oct 16, 2023
1 parent a2c91ae commit 4e07f4f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/services/keystore/keystoretest.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package keystore

import (
"errors"
"sync"

"github.com/smartcontractkit/sqlx"
Expand All @@ -26,14 +27,14 @@ func (o *memoryORM) isEmpty() (bool, error) {
return false, nil
}

func (o *memoryORM) saveEncryptedKeyRing(kr *encryptedKeyRing, callbacks ...func(pg.Queryer) error) error {
func (o *memoryORM) saveEncryptedKeyRing(kr *encryptedKeyRing, callbacks ...func(pg.Queryer) error) (err error) {
o.mu.Lock()
defer o.mu.Unlock()
o.keyRing = kr
for _, c := range callbacks {
c(o.q)
err = errors.Join(err, c(o.q))
}
return nil
return
}

func (o *memoryORM) getEncryptedKeyRing() (encryptedKeyRing, error) {
Expand Down

0 comments on commit 4e07f4f

Please sign in to comment.