From 2cbe66dcf4b362b4d087338c3100a32a612c4ca2 Mon Sep 17 00:00:00 2001 From: ScottyPoi Date: Wed, 21 Feb 2024 10:23:30 -0700 Subject: [PATCH 1/2] trie: export "Path" interface --- packages/trie/src/trie.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/trie/src/trie.ts b/packages/trie/src/trie.ts index 6ced72adcb..98feedcf36 100644 --- a/packages/trie/src/trie.ts +++ b/packages/trie/src/trie.ts @@ -47,7 +47,7 @@ import type { OnFound } from './util/asyncWalk.js' import type { BatchDBOp, DB, PutBatch } from '@ethereumjs/util' import type { Debugger } from 'debug' -interface Path { +export interface Path { node: TrieNode | null remaining: Nibbles stack: TrieNode[] From 5e9afe483bda45ddf748234c6166aa92d24f1136 Mon Sep 17 00:00:00 2001 From: Holger Drewes Date: Mon, 26 Feb 2024 10:52:46 +0100 Subject: [PATCH 2/2] Move over Path interface export to types for consistency --- packages/trie/src/trie.ts | 7 +------ packages/trie/src/types.ts | 6 ++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/trie/src/trie.ts b/packages/trie/src/trie.ts index 98feedcf36..b63036cf5b 100644 --- a/packages/trie/src/trie.ts +++ b/packages/trie/src/trie.ts @@ -37,6 +37,7 @@ import type { EmbeddedNode, FoundNodeFunction, Nibbles, + Path, Proof, TrieNode, TrieOpts, @@ -47,12 +48,6 @@ import type { OnFound } from './util/asyncWalk.js' import type { BatchDBOp, DB, PutBatch } from '@ethereumjs/util' import type { Debugger } from 'debug' -export interface Path { - node: TrieNode | null - remaining: Nibbles - stack: TrieNode[] -} - /** * The basic trie interface, use with `import { Trie } from '@ethereumjs/trie'`. */ diff --git a/packages/trie/src/types.ts b/packages/trie/src/types.ts index 9aa2d96e75..5928c2ee8a 100644 --- a/packages/trie/src/types.ts +++ b/packages/trie/src/types.ts @@ -20,6 +20,12 @@ export interface CommonInterface { } } +export interface Path { + node: TrieNode | null + remaining: Nibbles + stack: TrieNode[] +} + export type FoundNodeFunction = ( nodeRef: Uint8Array, node: TrieNode | null,