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

Commit

Permalink
perf: fork trie without key hashing
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmurdoch committed May 9, 2023
1 parent 9b8a716 commit f36538c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/chains/ethereum/ethereum/src/helpers/trie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { Trie } from "@ethereumjs/trie";
import Blockchain from "../blockchain";
import { TrieDB } from "../trie-db";

const keyHashingFunction = (msg: Uint8Array) => {
return keccak(Buffer.from(msg.buffer, msg.byteOffset, msg.length));
};

export class GanacheTrie extends Trie {
public readonly blockchain: Blockchain;
/**
Expand All @@ -22,8 +18,7 @@ export class GanacheTrie extends Trie {
db,
root,
useRootPersistence: true,
useKeyHashing: true,
useKeyHashingFunction: keyHashingFunction
useKeyHashing: false
});
this.blockchain = blockchain;
this.db = db;
Expand Down

0 comments on commit f36538c

Please sign in to comment.