tests: silentpayments: cover rejection of invalid keypair alongside a valid one #1937

pull Yudis-bit wants to merge 1 commits into bitcoin-core:master from Yudis-bit:test-silentpayments-invalid-keypair-alongside-valid changing 1 files +14 −0
  1. Yudis-bit commented at 9:53 AM on September 11, 2026: contributor

    Motivation & Context

    In PR #1931, tests were added to ensure that an invalid plain secret key (seckeys) is rejected even when passed alongside a valid one, exercising the early return in the seckeys loop.

    However, the equivalent loop for Taproot keypairs (keypairs in secp256k1_silentpayments_sender_create_outputs, src/modules/silentpayments/main_impl.h:245-258) currently only tests passing a single invalid keypair (t of length 1 at line 276).

    Changes

    This PR adds test coverage ensuring that an invalid Taproot keypair is properly rejected when passed alongside a valid one (t2[2]). The invalid keypair is tested in both positions (first and second index) so that neither the first nor the last keypair is skipped by the check, symmetrically matching the plain secret key test added in #1931.

  2. tests: silentpayments: cover rejection of invalid keypair alongside a valid one 28feff63b7

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-09-13 01:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me