mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: early return EMPTY_ROOT_HASH (#10957)
This commit is contained in:
@ -28,6 +28,10 @@ pub fn ordered_trie_root_with_encoder<T, F>(items: &[T], mut encode: F) -> B256
|
||||
where
|
||||
F: FnMut(&T, &mut Vec<u8>),
|
||||
{
|
||||
if items.is_empty() {
|
||||
return alloy_trie::EMPTY_ROOT_HASH;
|
||||
}
|
||||
|
||||
let mut value_buffer = Vec::new();
|
||||
|
||||
let mut hb = HashBuilder::default();
|
||||
|
||||
Reference in New Issue
Block a user