Skip to content

Commit

Permalink
make error types serializable (#2659)
Browse files Browse the repository at this point in the history
  • Loading branch information
bddap authored and yeastplume committed Mar 7, 2019
1 parent fd077a4 commit f30e59a
Show file tree
Hide file tree
Showing 9 changed files with 465 additions and 12 deletions.
9 changes: 6 additions & 3 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion core/src/core/committed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use crate::util::{secp, secp_static, static_secp_instance};
use failure::Fail;

/// Errors from summing and verifying kernel excesses via committed trait.
#[derive(Debug, Clone, PartialEq, Eq, Fail)]
#[derive(Debug, Clone, PartialEq, Eq, Fail, Serialize, Deserialize)]
pub enum Error {
/// Keychain related error.
#[fail(display = "Keychain error {}", _0)]
Expand Down
2 changes: 1 addition & 1 deletion core/src/core/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl Readable for KernelFeatures {
}

/// Errors thrown by Transaction validation
#[derive(Clone, Eq, Debug, PartialEq)]
#[derive(Clone, Eq, Debug, PartialEq, Serialize, Deserialize)]
pub enum Error {
/// Underlying Secp256k1 error (signature validation or invalid public key
/// typically)
Expand Down
2 changes: 1 addition & 1 deletion core/src/libtx/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub struct Error {
inner: Context<ErrorKind>,
}

#[derive(Clone, Debug, Eq, Fail, PartialEq)]
#[derive(Clone, Debug, Eq, Fail, PartialEq, Serialize, Deserialize)]
/// Libwallet error types
pub enum ErrorKind {
/// SECP error
Expand Down
Loading

0 comments on commit f30e59a

Please sign in to comment.