Skip to content

Commit

Permalink
wallet: add ability to pass i/o function to dogecoin_wallet_replace
Browse files Browse the repository at this point in the history
  • Loading branch information
xanimo committed Jul 14, 2023
1 parent cc98ebd commit 251c50b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/dogecoin/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ LIBDOGECOIN_API void dogecoin_wallet_free(dogecoin_wallet* wallet);
LIBDOGECOIN_API dogecoin_bool dogecoin_wallet_load(dogecoin_wallet* wallet, const char* file_path, int *error, dogecoin_bool *created);

/** load the wallet and replace a record */
LIBDOGECOIN_API dogecoin_bool dogecoin_wallet_replace(dogecoin_wallet* wallet, const char* file_path, cstring* record, uint8_t record_type, int *error);
LIBDOGECOIN_API dogecoin_bool dogecoin_wallet_replace(dogecoin_wallet* wallet, const char* file_path, cstring* record, uint8_t record_type, int *error, void (*rw)(void *));

/** writes the wallet state to disk */
LIBDOGECOIN_API dogecoin_bool dogecoin_wallet_flush(dogecoin_wallet* wallet);
Expand Down
3 changes: 2 additions & 1 deletion src/wallet.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,8 @@ dogecoin_bool dogecoin_wallet_replace(
const char* file_path,
cstring* record,
uint8_t record_type,
int *error)
int *error,
void (*rw)(void *))
{
if (!wallet) return false;

Expand Down

0 comments on commit 251c50b

Please sign in to comment.