diff --git a/stateless/tree_from_witness.nim b/stateless/tree_from_witness.nim index 8b26edc96..7aaa90be0 100644 --- a/stateless/tree_from_witness.nim +++ b/stateless/tree_from_witness.nim @@ -1,16 +1,8 @@ -import faststreams/input_stream, eth/common, stint, stew/endians2 +import + faststreams/input_stream, eth/common, stint, stew/endians2, + ./witness_types type - TrieNodeType = enum - BranchNodeType - ExtensionNodeType - AccountNodeType - HashNodeType - - AccountType = enum - SimpleAccountType - ExtendedAccountType - TreeBuilder = object input: InputStream diff --git a/stateless/witness_from_tree.nim b/stateless/witness_from_tree.nim index aef19ba78..98839cd85 100644 --- a/stateless/witness_from_tree.nim +++ b/stateless/witness_from_tree.nim @@ -2,7 +2,8 @@ import stew/byteutils, nimcrypto/[keccak, hash], eth/rlp, eth/trie/[trie_defs, nibbles, db], - faststreams/output_stream + faststreams/output_stream, + ./witness_types type DB = TrieDatabaseRef diff --git a/stateless/witness_types.nim b/stateless/witness_types.nim new file mode 100644 index 000000000..06c416eab --- /dev/null +++ b/stateless/witness_types.nim @@ -0,0 +1,10 @@ +type + TrieNodeType* = enum + BranchNodeType + ExtensionNodeType + AccountNodeType + HashNodeType + + AccountType* = enum + SimpleAccountType + ExtendedAccountType