Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions crates/freeze/src/multi_datasets/geth_state_diffs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ fn add_codes(
let blank = Bytes::new();
let (from_value, to_value) = match (pre, post) {
(Some(pre), Some(post)) => (pre, post),
(Some(pre), None) => (pre, &blank),
// geth only records post if the value changed; no post means code is unchanged
(Some(pre), None) => (pre, pre),
(None, Some(post)) => (&blank, post),
(None, None) => (&blank, &blank),
};
Expand Down Expand Up @@ -256,7 +257,8 @@ where
{
match (pre, post) {
(Some(pre), Some(post)) => (pre, post),
(Some(pre), None) => (pre, new),
// geth only records post if the value changed; no post means value is unchanged
(Some(pre), None) => (pre, pre),
(None, Some(post)) => (new, post),
(None, None) => (new, new),
}
Expand Down