Skip to content

Commit

Permalink
chore(hash-builder): use RlpNode::as_hash (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin authored Oct 16, 2024
1 parent fa3ade5 commit cf984af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hash_builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ impl HashBuilder {

fn current_root(&self) -> B256 {
if let Some(node_ref) = self.stack.last() {
if node_ref.len() == B256::len_bytes() + 1 {
B256::from_slice(&node_ref[1..])
if let Some(hash) = node_ref.as_hash() {
hash
} else {
keccak256(node_ref)
}
Expand Down

0 comments on commit cf984af

Please sign in to comment.