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

wallet: free waddrs in dogecoin_wallet_init #178

Merged

Conversation

xanimo
Copy link
Member

@xanimo xanimo commented Dec 7, 2023

-this pr removes 4 memleaks detected in dogecoin_wallet_init when passing in watch addresses. since we store the waddr in the wallet->waddr_vector we really just need to dispose of the waddr object being passed back during wallet init. this is also why dogecoin_p2pkh_addr_from_hash160 was removed since it's unnecessary.

@xanimo xanimo force-pushed the 0.1.3-dev-free_waddrs branch 4 times, most recently from 6b39c43 to e4aec01 Compare December 14, 2023 02:27
-remove frees on wallet init
-move wallet addr initialization within if no match section of dogecoin_p2pkh_address_to_wallet
-assign dogecoin_utxo* directly from vector_idx in dogecoin_wallet_scrape_utxos
-conditionally set wallet->unspent->elem_free_f to dogeocin_wallet_utxo_free in dogecoin_wallet_check_transaction
@xanimo xanimo force-pushed the 0.1.3-dev-free_waddrs branch from e4aec01 to dc2539f Compare December 22, 2023 04:50
Copy link
Collaborator

@edtubbs edtubbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, reviewed and tested with msvc and linux on x86_64 and armv8

@michilumin michilumin self-requested a review December 22, 2023 06:44
@michilumin michilumin merged commit 3bc14e8 into dogecoinfoundation:0.1.3-dev Dec 22, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants