Revert "Remove error serialization/deserialization (#3110)" (#3151)

This reverts commit 76ac9419b8.
This commit is contained in:
hashmap
2019-11-29 13:37:50 +01:00
committed by Yeastplume
parent 3f528a8e66
commit ba9cdd323e
7 changed files with 469 additions and 15 deletions
+1 -1
View File
@@ -295,7 +295,7 @@ impl serde::Serialize for ChildNumber {
}
/// A BIP32 error
#[derive(Clone, PartialEq, Eq, Debug)]
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
pub enum Error {
/// A pk->pk derivation was attempted on a hardened key
CannotDeriveFromHardenedKey,
+1 -1
View File
@@ -29,7 +29,7 @@ lazy_static! {
}
/// An error that might occur during mnemonic decoding
#[derive(Debug, PartialEq, Eq, Clone)]
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)]
pub enum Error {
/// Invalid word encountered
BadWord(String),
+1 -1
View File
@@ -40,7 +40,7 @@ use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
// Size of an identifier in bytes
pub const IDENTIFIER_SIZE: usize = 17;
#[derive(PartialEq, Eq, Clone, Debug)]
#[derive(PartialEq, Eq, Clone, Debug, Serialize, Deserialize)]
pub enum Error {
Secp(secp::Error),
KeyDerivation(extkey_bip32::Error),