Skip to content

Commit

Permalink
revertme: use serde json again
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin committed Oct 1, 2024
1 parent c1fe123 commit 989700b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 26 deletions.
24 changes: 1 addition & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion crates/exex/exex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ eyre.workspace = true
itertools.workspace = true
metrics.workspace = true
parking_lot.workspace = true
rmp-serde = "1.3"
# rmp-serde = "1.3"
serde_json.workspace = true
tracing.workspace = true

[dev-dependencies]
Expand Down
6 changes: 4 additions & 2 deletions crates/exex/exex/src/wal/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ impl Storage {

// Deserialize using the bincode- and msgpack-compatible serde wrapper
let notification: reth_exex_types::serde_bincode_compat::ExExNotification<'_> =
rmp_serde::decode::from_read(&mut file).map_err(|err| {
// rmp_serde::decode::from_read(&mut file).map_err(|err| {
serde_json::from_reader(&mut file).map_err(|err| {
eyre::eyre!("failed to decode notification from {file_path:?}: {err:?}")
})?;

Expand All @@ -140,7 +141,8 @@ impl Storage {
reth_exex_types::serde_bincode_compat::ExExNotification::from(notification);

Ok(reth_fs_util::atomic_write_file(&file_path, |file| {
rmp_serde::encode::write(file, &notification)
// rmp_serde::encode::write(file, &notification)
serde_json::to_writer(file, &notification)
})?)
}
}
Expand Down

0 comments on commit 989700b

Please sign in to comment.