Skip to content

Commit

Permalink
Reverting to C++ style, and some other changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sellout committed Sep 25, 2024
1 parent 3c735f2 commit f97b8b4
Show file tree
Hide file tree
Showing 6 changed files with 926 additions and 759 deletions.
34 changes: 34 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ rust-interpreter = []

[dependencies]
bitflags = "2.5"
enum_primitive = "0.1"
log = "0.4"
ripemd = "0.1"
secp256k1 = "0.29"
Expand Down
9 changes: 8 additions & 1 deletion src/external/pubkey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ impl PubKey<'_> {
}

pub fn check_low_s(vch_sig: &Vec<u8>) -> bool {

Check failure on line 48 in src/external/pubkey.rs

View workflow job for this annotation

GitHub Actions / Clippy (stable)

writing `&Vec` instead of `&[_]` involves a new object where a slice will do
todo!()
/* Zcash, unlike Bitcoin, has always enforced strict DER signatures. */
if let Ok(sig) = ecdsa::Signature::from_der(vch_sig) {
let mut check = sig.clone();
check.normalize_s();
sig == check
} else {
false
}
}
}
Loading

0 comments on commit f97b8b4

Please sign in to comment.