aboutsummaryrefslogtreecommitdiff
path: root/src/account.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/account.rs')
-rw-r--r--src/account.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/account.rs b/src/account.rs
index 511d6aa..eda93bf 100644
--- a/src/account.rs
+++ b/src/account.rs
@@ -5,7 +5,7 @@ mod signature;
pub use self::{
address::Address,
- signature::{Parity, Signature},
+ signature::{Signature, YParity},
};
use crate::hash;
use anyhow::Result;
@@ -65,8 +65,8 @@ impl PrivateKey {
Signature {
y_parity: match recovery_id.to_i32() {
- 0 => Parity::Even,
- 1 => Parity::Odd,
+ 0 => YParity::Even,
+ 1 => YParity::Odd,
n => unreachable!("non 0 or 1 signature y-parity bit {}", n),
},
r: raw_signature[..32].try_into().unwrap(),
@@ -109,7 +109,7 @@ mod tests {
assert_eq!(
key.sign(message),
Signature {
- y_parity: Parity::Odd,
+ y_parity: YParity::Odd,
r: hex!("408790f153cbfa2722fc708a57d97a43b24429724cf060df7c915d468c43bd84"),
s: hex!("61c96aac95ce37d7a31087b6634f4a3ea439a9f704b5c818584fa2a32fa83859"),
},