-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: implement serializable trait for filled node from exists me…
…thods
- Loading branch information
1 parent
15f5469
commit 50ed640
Showing
7 changed files
with
40 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
crates/committer/src/patricia_merkle_tree/node_data/leaf_serde.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
use crate::storage::storage_trait::StorageKey; | ||
use derive_more::Display; | ||
use serde_json; | ||
use thiserror::Error; | ||
|
||
use crate::storage::storage_trait::StorageValue; | ||
|
||
#[derive(Debug, Error)] | ||
#[allow(dead_code)] | ||
pub(crate) enum StorageError { | ||
#[error("The key {0:?} does not exist in storage.")] | ||
MissingKey(StorageKey), | ||
} | ||
|
||
#[derive(thiserror::Error, Debug, Display)] | ||
#[derive(thiserror::Error, Debug)] | ||
#[allow(dead_code)] | ||
pub(crate) enum SerializationError { | ||
DeserializeError, | ||
SerializeError, | ||
#[error("Failed to deserialize the storage value: {0:?}")] | ||
DeserializeError(StorageValue), | ||
#[error("Serialize error: {0}")] | ||
SerializeError(#[from] serde_json::Error), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters