Merge pull request #704 from mir-protocol/partial_trie_derive

Added a few derives to `Trie` types
This commit is contained in:
BGluth 2022-09-06 07:14:30 -07:00 committed by GitHub
commit c874fc5488
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
use ethereum_types::U256;
#[derive(Clone, Debug)]
/// 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.
@ -22,6 +23,7 @@ pub enum PartialTrie {
Leaf { nibbles: Nibbles, value: Vec<u8> },
}
#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
/// A sequence of nibbles.
pub struct Nibbles {
/// The number of nibbles in this sequence.