From da7702844e212f0cc165d1560a4dc09a05811dae Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Fri, 21 Apr 2023 15:56:09 +0200 Subject: [PATCH] extrakeys: Clarify comparison order of compare/sort functions Note that the touched functions don't exist upstream currently. --- include/secp256k1_extrakeys.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/secp256k1_extrakeys.h b/include/secp256k1_extrakeys.h index deb8dc8b..d8e05398 100644 --- a/include/secp256k1_extrakeys.h +++ b/include/secp256k1_extrakeys.h @@ -242,7 +242,8 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_xonly_tweak_add const unsigned char *tweak32 ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); -/** Compare two public keys using lexicographic order +/** Compare two public keys using lexicographic order of their compressed + * serialization. * * Returns: <0 if the first public key is less than the second * >0 if the first public key is greater than the second @@ -257,7 +258,8 @@ SECP256K1_API int secp256k1_pubkey_cmp( const secp256k1_pubkey* pk2 ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); -/** Sorts public keys using lexicographic order +/** Sort public keys using lexicographic order of their compressed + * serialization. * * Returns: 0 if the arguments are invalid. 1 otherwise. *