From 27a7ab2373a268c49162a038d9024608d10daa3c Mon Sep 17 00:00:00 2001 From: zeapoz Date: Mon, 8 Apr 2024 10:26:19 +0200 Subject: [PATCH] fix: correct wrong endianness --- src/processor/snapshot/database.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/processor/snapshot/database.rs b/src/processor/snapshot/database.rs index e45ac56..a43cc5f 100644 --- a/src/processor/snapshot/database.rs +++ b/src/processor/snapshot/database.rs @@ -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.