diff --git a/evm/src/generation/partial_trie.rs b/evm/src/generation/partial_trie.rs index 509379aa..96751310 100644 --- a/evm/src/generation/partial_trie.rs +++ b/evm/src/generation/partial_trie.rs @@ -1,17 +1,25 @@ use ethereum_types::U256; -/// A partial trie, or a sub-trie thereof. +/// A partial trie, or a sub-trie thereof. This mimics the structure of an Ethereum trie, except +/// with an additional `Hash` node type, representing a node whose data is not needed to process +/// our transaction. pub enum PartialTrie { /// An empty trie. Empty, /// The digest of trie whose data does not need to be stored. Hash(U256), /// A branch node, which consists of 16 children and an optional value. - Branch([Box; 16], Option), + Branch { + children: [Box; 16], + value: Option, + }, /// An extension node, which consists of a list of nibbles and a single child. - Extension(Nibbles, Box), + Extension { + nibbles: Nibbles, + child: Box, + }, /// A leaf node, which consists of a list of nibbles and a value. - Leaf(Nibbles, Vec), + Leaf { nibbles: Nibbles, value: Vec }, } /// A sequence of nibbles.