Make HashDB generic (#8739)
The `patricia_trie` crate is generic over the hasher (by way of HashDB) and node encoding scheme. Adds a new `patricia_trie_ethereum` crate with concrete impls for Keccak/RLP.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
use ethereum_types::{U256, U512, Address};
|
||||
use bytes::Bytes;
|
||||
use trie;
|
||||
use ethtrie;
|
||||
use vm;
|
||||
use trace::{VMTrace, FlatTrace};
|
||||
use log_entry::LogEntry;
|
||||
@@ -117,9 +117,14 @@ pub enum ExecutionError {
|
||||
TransactionMalformed(String),
|
||||
}
|
||||
|
||||
impl From<Box<trie::TrieError>> for ExecutionError {
|
||||
fn from(err: Box<trie::TrieError>) -> Self {
|
||||
ExecutionError::Internal(format!("{}", err))
|
||||
impl From<Box<ethtrie::TrieError>> for ExecutionError {
|
||||
fn from(err: Box<ethtrie::TrieError>) -> Self {
|
||||
ExecutionError::Internal(format!("{:?}", err))
|
||||
}
|
||||
}
|
||||
impl From<ethtrie::TrieError> for ExecutionError {
|
||||
fn from(err: ethtrie::TrieError) -> Self {
|
||||
ExecutionError::Internal(format!("{:?}", err))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user