Skip to content

Commit

Permalink
fix: correct wrong endianness
Browse files Browse the repository at this point in the history
  • Loading branch information
zeapoz committed Apr 8, 2024
1 parent 2635d3a commit 27a7ab2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/processor/snapshot/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl SnapshotDB {
PackingType::NoCompression(v) | PackingType::Transform(v) => v,
PackingType::Add(_) | PackingType::Sub(_) => {
let mut buffer = [0; 32];
key.to_little_endian(&mut buffer);
key.to_big_endian(&mut buffer);
if let Ok(Some(log)) = self.get_storage_log(&buffer) {
let existing_value = U256::from(log.value.to_fixed_bytes());
// NOTE: We're explicitly allowing over-/underflow as per the spec.
Expand Down

0 comments on commit 27a7ab2

Please sign in to comment.