Skip to content

Commit

Permalink
vm: adjust test runners with non-default caches
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrocheleau committed Aug 9, 2024
1 parent c754eac commit 5d4895c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/vm/test/tester/runners/BlockchainTestsRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { EthashConsensus, createBlockchain } from '@ethereumjs/blockchain'
import { ConsensusAlgorithm } from '@ethereumjs/common'
import { Ethash } from '@ethereumjs/ethash'
import { RLP } from '@ethereumjs/rlp'
import { DefaultStateManager } from '@ethereumjs/statemanager'
import { Caches, DefaultStateManager } from '@ethereumjs/statemanager'
import { Trie } from '@ethereumjs/trie'
import { createTxFromSerializedData } from '@ethereumjs/tx'
import {
Expand Down Expand Up @@ -49,6 +49,7 @@ export async function runBlockchainTest(options: any, testData: any, t: tape.Tes
let cacheDB = new MapDB()
let state = new Trie({ useKeyHashing: true, common })
let stateManager = new DefaultStateManager({
caches: new Caches(),
trie: state,
common,
})
Expand Down
3 changes: 2 additions & 1 deletion packages/vm/test/tester/runners/GeneralStateTestsRunner.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Block } from '@ethereumjs/block'
import { createBlockchain } from '@ethereumjs/blockchain'
import { type InterpreterStep } from '@ethereumjs/evm'
import { DefaultStateManager } from '@ethereumjs/statemanager'
import { Caches, DefaultStateManager } from '@ethereumjs/statemanager'
import { Trie } from '@ethereumjs/trie'
import {
Account,
Expand Down Expand Up @@ -81,6 +81,7 @@ async function runTestCase(options: any, testData: any, t: tape.Test) {
const blockchain = await createBlockchain({ genesisBlock, common })
const state = new Trie({ useKeyHashing: true, common })
const stateManager = new DefaultStateManager({
caches: new Caches(),
trie: state,
common,
})
Expand Down

0 comments on commit 5d4895c

Please sign in to comment.