Hi,
I'm working on Rust language bindings for bitcoin-secp256k1 and I can't get tests verifing the compact signatures to work:
The code is here: https://github.com/dpc/bitcoin-secp256k1-rs/blob/master/src/secp256k1.rs#L354
The results are here:
running 8 tests
test sign_and_verify ... ok
test sign_compact ... FAILED
test valid_pubkey_compressed ... ok
test sign ... ok
test invalid_pubkey ... ok
test valid_pubkey_uncompressed ... ok
test sign_and_verify_fail ... ok
test sign_compact_with_recovery ... FAILED
failures:
---- sign_compact stdout ----
task 'sign_compact' failed at 'assertion failed: `(left == right) && (right == left)` (left: `Err(InvalidSignature)`, right: `Ok(true)`)', src/secp256k1.rs:370
---- sign_compact_with_recovery stdout ----
task 'sign_compact_with_recovery' failed at 'assertion failed: `(left == right) && (right == left)` (left: `Err(InvalidSignature)`, right: `Ok(true)`)', src/secp256k1.rs:392
failures:
sign_compact
sign_compact_with_recovery
test result: FAILED. 6 passed; 2 failed; 0 ignored; 0 measured
task '<main>' failed at 'Some tests failed', /home/dpc/opt/src/rust/src/libtest/lib.rs:242
An unknown error occurred
make: *** [test] Error 1
Am I missing something obvious?