Skip to content

Commit

Permalink
psbt: make find accessor parameters const
Browse files Browse the repository at this point in the history
  • Loading branch information
jgriffiths committed Oct 28, 2024
1 parent 10ad023 commit 230f62c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions include/wally_psbt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/psbt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down

0 comments on commit 230f62c

Please sign in to comment.