Skip to content

Commit

Permalink
Simplify code (#3058)
Browse files Browse the repository at this point in the history
  • Loading branch information
scorbajio authored Sep 24, 2023
1 parent d584ae4 commit 8d7d8af
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/statemanager/src/cache/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,7 @@ export class StorageCache extends Cache {

_saveCachePreState(addressHex: string, keyHex: string) {
const addressStoragePreState = this._diffCache[this._checkpoints].get(addressHex)
let diffStorageMap: DiffStorageCacheMap
if (addressStoragePreState === undefined) {
diffStorageMap = new Map()
} else {
diffStorageMap = addressStoragePreState
}
const diffStorageMap: DiffStorageCacheMap = addressStoragePreState ?? new Map()

if (!diffStorageMap.has(keyHex)) {
let oldStorageMap: StorageCacheMap | undefined
Expand Down

0 comments on commit 8d7d8af

Please sign in to comment.