From 230f62c3d3f2e1e988337f8da1642aa00c2c624e Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Tue, 29 Oct 2024 09:46:57 +1300 Subject: [PATCH] psbt: make find accessor parameters const --- include/wally_psbt.h | 10 +++++----- src/psbt.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/wally_psbt.h b/include/wally_psbt.h index 22d6ae841..98e95d925 100644 --- a/include/wally_psbt.h +++ b/include/wally_psbt.h @@ -283,7 +283,7 @@ WALLY_CORE_API int wally_psbt_input_set_keypaths( * .. note:: This function only finds non-taproot keypaths. */ WALLY_CORE_API int wally_psbt_input_find_keypath( - struct wally_psbt_input *input, + const struct wally_psbt_input *input, const unsigned char *pub_key, size_t pub_key_len, size_t *written); @@ -364,7 +364,7 @@ WALLY_CORE_API int wally_psbt_input_set_taproot_signature( *| the index of the item plus one. */ WALLY_CORE_API int wally_psbt_input_find_signature( - struct wally_psbt_input *input, + const struct wally_psbt_input *input, const unsigned char *pub_key, size_t pub_key_len, size_t *written); @@ -405,7 +405,7 @@ WALLY_CORE_API int wally_psbt_input_set_unknowns( *| the index of the item plus one. */ WALLY_CORE_API int wally_psbt_input_find_unknown( - struct wally_psbt_input *input, + const struct wally_psbt_input *input, const unsigned char *key, size_t key_len, size_t *written); @@ -1318,7 +1318,7 @@ WALLY_CORE_API int wally_psbt_output_set_keypaths( * .. note:: This function only finds non-taproot keypaths. */ WALLY_CORE_API int wally_psbt_output_find_keypath( - struct wally_psbt_output *output, + const struct wally_psbt_output *output, const unsigned char *pub_key, size_t pub_key_len, size_t *written); @@ -1387,7 +1387,7 @@ WALLY_CORE_API int wally_psbt_output_set_unknowns( *| the index of the item plus one. */ WALLY_CORE_API int wally_psbt_output_find_unknown( - struct wally_psbt_output *output, + const struct wally_psbt_output *output, const unsigned char *key, size_t key_len, size_t *written); diff --git a/src/psbt.c b/src/psbt.c index a2f9c1979..7797e1b3d 100644 --- a/src/psbt.c +++ b/src/psbt.c @@ -210,7 +210,7 @@ static bool is_taproot_input(const struct wally_psbt *psbt, if (!parent) return WALLY_EINVAL; \ return wally_map_assign(&parent->NAME ## s, map_in); \ } \ - int PARENT ## _find_ ## NAME(struct PARENT *parent, \ + int PARENT ## _find_ ## NAME(const struct PARENT *parent, \ const unsigned char *key, size_t key_len, \ size_t *written) { \ if (written) *written = 0; \