Skip to content

Commit

Permalink
Merge branch 'master' into implement-eip3540
Browse files Browse the repository at this point in the history
  • Loading branch information
holgerd77 authored Mar 14, 2022
2 parents 1114476 + 92587f7 commit 3fb6bab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/blockchain/src/db/operation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,10 @@ export class DBOp {
}

public updateCache(cacheMap: CacheMap) {
if (this.cacheString && cacheMap[this.cacheString] && Buffer.isBuffer(this.baseDBOp.value)) {
if (this.cacheString && cacheMap[this.cacheString]) {
if (this.baseDBOp.type == 'put') {
cacheMap[this.cacheString].set(this.baseDBOp.key, this.baseDBOp.value)
Buffer.isBuffer(this.baseDBOp.value) &&
cacheMap[this.cacheString].set(this.baseDBOp.key, this.baseDBOp.value)
} else if (this.baseDBOp.type == 'del') {
cacheMap[this.cacheString].del(this.baseDBOp.key)
} else {
Expand Down

0 comments on commit 3fb6bab

Please sign in to comment.