Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

psbt: make find accessor parameters const #464

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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