Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit f36538c

Browse files
committed
perf: fork trie without key hashing
1 parent 9b8a716 commit f36538c

File tree

1 file changed

+1
-6
lines changed
  • src/chains/ethereum/ethereum/src/helpers

1 file changed

+1
-6
lines changed

src/chains/ethereum/ethereum/src/helpers/trie.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ import { Trie } from "@ethereumjs/trie";
33
import Blockchain from "../blockchain";
44
import { TrieDB } from "../trie-db";
55

6-
const keyHashingFunction = (msg: Uint8Array) => {
7-
return keccak(Buffer.from(msg.buffer, msg.byteOffset, msg.length));
8-
};
9-
106
export class GanacheTrie extends Trie {
117
public readonly blockchain: Blockchain;
128
/**
@@ -22,8 +18,7 @@ export class GanacheTrie extends Trie {
2218
db,
2319
root,
2420
useRootPersistence: true,
25-
useKeyHashing: true,
26-
useKeyHashingFunction: keyHashingFunction
21+
useKeyHashing: false
2722
});
2823
this.blockchain = blockchain;
2924
this.db = db;

0 commit comments

Comments
 (0)