Skip to content

Backport: Add apply_unconfirmed_txs_events and apply_evicted_txs_events#399

Open
notmandatory wants to merge 4 commits intobitcoindevkit:release/2.xfrom
notmandatory:backport/mempool_events
Open

Backport: Add apply_unconfirmed_txs_events and apply_evicted_txs_events#399
notmandatory wants to merge 4 commits intobitcoindevkit:release/2.xfrom
notmandatory:backport/mempool_events

Conversation

@notmandatory
Copy link
Member

@notmandatory notmandatory commented Mar 10, 2026

Description

Backport #388 to release/2.x branch.

Notes to the reviewers

I had to make some small changes in 5740150 to fix differences in 2.x use statements related to fmt and that WalletEvents isn't exposed at the module level.

Changelog notice

  • Add Wallet::apply_unconfirmed_txs_events
  • Add Wallet::apply_evicted_txs_events
  • Add Wallet::events_helper function for advanced users

Checklists

All Submissions:

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

notmandatory and others added 2 commits March 9, 2026 19:40
…events

- refactor _events functions to use new map_transactions helper
This can be used to generate `WalletEvent`s after executing a
function defined by the caller.

Refactored the `*_events` functions to use the events helper
internally.

test: Test that no events are returned by applying an empty
Update and applying the same Update twice.
@notmandatory notmandatory added this to the Wallet 2.4.0 milestone Mar 10, 2026
@notmandatory notmandatory self-assigned this Mar 10, 2026
@notmandatory notmandatory added the new feature New feature or request label Mar 10, 2026
@notmandatory notmandatory moved this to Needs Review in BDK Wallet Mar 10, 2026
@notmandatory notmandatory force-pushed the backport/mempool_events branch from df35816 to 602ab20 Compare March 10, 2026 02:19
@notmandatory notmandatory marked this pull request as draft March 10, 2026 02:31
@notmandatory
Copy link
Member Author

Set to draft until I can figure out the MSRV issues.

@notmandatory notmandatory moved this from Needs Review to In Progress in BDK Wallet Mar 10, 2026
@notmandatory notmandatory force-pushed the backport/mempool_events branch 8 times, most recently from 5b49cef to 2c6b2ad Compare March 10, 2026 04:21
@notmandatory notmandatory force-pushed the backport/mempool_events branch from 2c6b2ad to ff7c15d Compare March 10, 2026 04:49
@notmandatory
Copy link
Member Author

Finally got it to build successfully with msrv 1.63. I need to do a little more research to figure out why I had to pin so many dependencies.

@notmandatory
Copy link
Member Author

notmandatory commented Mar 10, 2026

From chat on discord sounds like I'm not the only one who's had issues with these crates not respecting MSRV so moved this to ready to review.

https://discord.com/channels/753336465005608961/1368973459551555605/1480933702778491061

@notmandatory notmandatory marked this pull request as ready for review March 10, 2026 14:26
@notmandatory notmandatory moved this from In Progress to Needs Review in BDK Wallet Mar 10, 2026
Copy link
Collaborator

@ValuedMammal ValuedMammal left a comment

Choose a reason for hiding this comment

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

ACK ff7c15d; ran the tests locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature New feature or request

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

2 participants