multi: add reset closure to kvdb.Update
Similarly as with kvdb.View this commits adds a reset closure to the kvdb.Update call in order to be able to reset external state if the underlying db backend needs to retry the transaction.
This commit is contained in:
44 files changed
+208
-162
No files matched your search
@@ -80,7 +80,7 @@ func (s *WaitingProofStore) Add(proof *WaitingProof) error {
|
||||
key := proof.Key()
|
||||
|
||||
return bucket.Put(key[:], b.Bytes())
|
||||
})
|
||||
}, func() {})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -109,7 +109,7 @@ func (s *WaitingProofStore) Remove(key WaitingProofKey) error {
|
||||
}
|
||||
|
||||
return bucket.Delete(key[:])
|
||||
})
|
||||
}, func() {})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user