Merge bitcoin-core/secp256k1#1867: test: musig: fix dead "aggnonce encodes two points at infinity" check
d7125e517dtest: musig: fix dead "aggnonce encodes two points at infinity" check (Sebastian Falbesoner) Pull request description: Due to the missing `CHECK` around, the return values were discarded and nothing was actually checked here. (Fwiw I prompted two AI models (MiniMax M3 and Opus 4.8) to find more similar instances in tests with bare statements that miss a surrounding `CHECK` in tests, and both didn't find any.) ACKs for top commit: real-or-random: utACKd7125e517dhebasto: ACKd7125e517d, I have reviewed the code and it looks OK. Tree-SHA512: 6eab61ce51a414e0555413bde29cf582b70fbf4a24ad1aae135bf88f28e3ee25ece8c79b7ccc254288395fedf6b2547931d5e00b0090146f1b83e43acc6570d7
This commit is contained in:
@@ -374,7 +374,7 @@ static void musig_api_tests(void) {
|
||||
secp256k1_ge aggnonce_pt[2];
|
||||
secp256k1_musig_aggnonce_load(CTX, aggnonce_pt, &aggnonce);
|
||||
for (i = 0; i < 2; i++) {
|
||||
secp256k1_ge_is_infinity(&aggnonce_pt[i]);
|
||||
CHECK(secp256k1_ge_is_infinity(&aggnonce_pt[i]) == 1);
|
||||
}
|
||||
}
|
||||
CHECK(secp256k1_musig_nonce_agg(CTX, &aggnonce, pubnonce_ptr, 2) == 1);
|
||||
|
||||
Reference in New Issue
Block a user