minor clean up and fmt

This commit is contained in:
jonesmarvin8 2025-12-23 17:42:30 -05:00
parent 3c21f4418f
commit 065eeac3b2

View File

@ -67,14 +67,18 @@ impl KeyNode for ChildKeysPublic {
.expect("hash_value is 64 bytes, must be safe to get first 32"),
)
.unwrap();
//TODO: remove unwrap
let csk = nssa::PrivateKey::try_new(
csk.add_tweak(&Scalar::from_le_bytes(*self.csk.value()).unwrap())
.expect("TODO")
.secret_bytes(), //.secret_bytes().expect("TODO");
.expect("Expect a valid Scalar")
.secret_bytes(),
)
.unwrap();
if secp256k1::constants::CURVE_ORDER < *csk.value() {
panic!("Secret key cannot exceed curve order");
}
let ccc = *hash_value
.last_chunk::<32>()
.expect("hash_value is 64 bytes, must be safe to get last 32");