Skip to content

Commit

Permalink
fix: skip empty request objects
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Dec 31, 2024
1 parent 86b46b9 commit d414596
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/eips/src/eip7685.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ impl Requests {
use sha2::{Digest, Sha256};
let mut hash = Sha256::new();
for req in self.0.iter() {
if req.is_empty() {
// Empty requests are omitted from the hash calculation.
continue;
}

let mut req_hash = Sha256::new();
req_hash.update(req);
hash.update(req_hash.finalize());
Expand Down

0 comments on commit d414596

Please sign in to comment.