lightningd: use 33 byte pubkeys internally.

We still use 32 bytes on the wire, but internally don't use x-only.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-10-17 11:05:31 +10:30
parent 987adb9718
commit bed905a394
14 changed files with 76 additions and 94 deletions

View File

@@ -318,11 +318,7 @@ static bool print_signature(const char *messagename,
merkle_tlv(fields, &m);
sighash_from_merkle(messagename, fieldname, &m, &shash);
if (secp256k1_schnorrsig_verify(secp256k1_ctx,
sig->u8,
shash.u.u8,
sizeof(shash.u.u8),
&node_id->pubkey) != 1) {
if (!check_schnorr_sig(&shash, &node_id->pubkey, sig)) {
fprintf(stderr, "%s: INVALID\n", fieldname);
return false;
}