Skip to content

Commit

Permalink
Fix broken ECDSASignature::is_unsigned method
Browse files Browse the repository at this point in the history
  • Loading branch information
kseo committed Jul 10, 2018
1 parent 0990b70 commit 6e78e95
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions key/src/ecdsa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use std::hash::{Hash, Hasher};
use std::ops::{Deref, DerefMut};
use std::str::FromStr;

use codechain_types::{H256, H520};
use codechain_types::{H256, H520, U256};
use rustc_hex::{FromHex, ToHex};
use secp256k1::{key, Error as SecpError, Message as SecpMessage, RecoverableSignature, RecoveryId};

Expand Down Expand Up @@ -90,7 +90,9 @@ impl ECDSASignature {
}

pub fn is_unsigned(&self) -> bool {
self.r().is_zero() && self.s().is_zero()
let r: U256 = self.r().into();
let s: U256 = self.s().into();
r.is_zero() && s.is_zero()
}
}

Expand Down

0 comments on commit 6e78e95

Please sign in to comment.