Add a test checking `PrivateKey::from_slice`
This test checks the previous fix - if ordered before the previous commit it will fail.
This commit is contained in:
parent
b87ddc0043
commit
1778fea66e
|
@ -1600,4 +1600,11 @@ mod tests {
|
|||
panic!("Expected Invalid char error");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn invalid_private_key_len() {
|
||||
use crate::Network;
|
||||
assert!(PrivateKey::from_slice(&[1u8; 31], Network::Regtest).is_err());
|
||||
assert!(PrivateKey::from_slice(&[1u8; 33], Network::Regtest).is_err());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue