Skip to content

Commit 230f62c

Browse files
committed
psbt: make find accessor parameters const
1 parent 10ad023 commit 230f62c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

include/wally_psbt.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ WALLY_CORE_API int wally_psbt_input_set_keypaths(
283283
* .. note:: This function only finds non-taproot keypaths.
284284
*/
285285
WALLY_CORE_API int wally_psbt_input_find_keypath(
286-
struct wally_psbt_input *input,
286+
const struct wally_psbt_input *input,
287287
const unsigned char *pub_key,
288288
size_t pub_key_len,
289289
size_t *written);
@@ -364,7 +364,7 @@ WALLY_CORE_API int wally_psbt_input_set_taproot_signature(
364364
*| the index of the item plus one.
365365
*/
366366
WALLY_CORE_API int wally_psbt_input_find_signature(
367-
struct wally_psbt_input *input,
367+
const struct wally_psbt_input *input,
368368
const unsigned char *pub_key,
369369
size_t pub_key_len,
370370
size_t *written);
@@ -405,7 +405,7 @@ WALLY_CORE_API int wally_psbt_input_set_unknowns(
405405
*| the index of the item plus one.
406406
*/
407407
WALLY_CORE_API int wally_psbt_input_find_unknown(
408-
struct wally_psbt_input *input,
408+
const struct wally_psbt_input *input,
409409
const unsigned char *key,
410410
size_t key_len,
411411
size_t *written);
@@ -1318,7 +1318,7 @@ WALLY_CORE_API int wally_psbt_output_set_keypaths(
13181318
* .. note:: This function only finds non-taproot keypaths.
13191319
*/
13201320
WALLY_CORE_API int wally_psbt_output_find_keypath(
1321-
struct wally_psbt_output *output,
1321+
const struct wally_psbt_output *output,
13221322
const unsigned char *pub_key,
13231323
size_t pub_key_len,
13241324
size_t *written);
@@ -1387,7 +1387,7 @@ WALLY_CORE_API int wally_psbt_output_set_unknowns(
13871387
*| the index of the item plus one.
13881388
*/
13891389
WALLY_CORE_API int wally_psbt_output_find_unknown(
1390-
struct wally_psbt_output *output,
1390+
const struct wally_psbt_output *output,
13911391
const unsigned char *key,
13921392
size_t key_len,
13931393
size_t *written);

src/psbt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ static bool is_taproot_input(const struct wally_psbt *psbt,
210210
if (!parent) return WALLY_EINVAL; \
211211
return wally_map_assign(&parent->NAME ## s, map_in); \
212212
} \
213-
int PARENT ## _find_ ## NAME(struct PARENT *parent, \
213+
int PARENT ## _find_ ## NAME(const struct PARENT *parent, \
214214
const unsigned char *key, size_t key_len, \
215215
size_t *written) { \
216216
if (written) *written = 0; \

0 commit comments

Comments
 (0)