From: merge-script Date: Sat, 26 Jul 2025 10:47:05 +0000 (+0000) Subject: Merge bitcoindevkit/bdk#1988: Detect new mempool txs X-Git-Tag: bitcoind_rpc-0.21.0~5 X-Git-Url: http://internal-gitweb-vhost/?a=commitdiff_plain;h=a48c97a1055f2f5a11879d3e8c45c924399bf6e9;p=bdk Merge bitcoindevkit/bdk#1988: Detect new mempool txs 51ee99a39fbf9a6dc0ead964e794ca3bebd43ed0 docs(bitcoind_rpc): fixed typo in docs (Wei Chen) 73ab1eb06bcfaa0368a07b84a054bdd2f4f84f06 chore(bitcoind_rpc): Make clippy happy (志宇) 7e894f464ffc0fc21a05e485eae574292e8a63d5 feat(bitcoind_rpc)!: Use `getrawmempool` without verbose (志宇) 05464ecf850feabd30a13aa4927d8797d06148cf fix(bitcoind_rpc)!: Simplify emitter (志宇) 67dfb0b1482f81fe5a888e94c8f54dc5be99e409 test(bitcoind_rpc): Detect new mempool txs (志宇) Pull request description: ### Description There is a bug in `bdk_bitcoind_rpc` where some new mempool transactions will not be emitted at all. This problem exists because the avoid-re-emission logic depends on rounded-to-nearest-second timestamps. The fix is to just emit all mempool transactions but wrap them in `Arc`s so that emission becomes cheap. **Background:** I tried using `bdk_bitcoind_rpc` as the chain-source to write an example to showcase the [`IntentTracker`](https://github.com/bitcoindevkit/bdk_wallet/pull/257). However, `bdk_bitcoind_rpc` failed to emit some mempool transactions. ### Notes to the reviewers The test added in c22c68f fails without these fixes. Some tests are removed as they are no longer relevant. ### Changelog notice ```md Fixed: - Some mempool transactions not being emitted at all. The fix is to replace the avoid-re-emission-logic with one which emits all mempool transactions. ``` ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo +nightly fmt` and `cargo clippy` before committing #### Bugfixes: * [x] This pull request breaks the existing API * [x] I've added tests to reproduce the issue which are now passing ~* [ ] I'm linking the issue being fixed by this PR~ ACKs for top commit: nymius: cACK 51ee99a39fbf9a6dc0ead964e794ca3bebd43ed0 LagginTimes: Re-ACK 51ee99a39fbf9a6dc0ead964e794ca3bebd43ed0 Tree-SHA512: 04e180e1d28c3f4c581a61ccac95e8e7e6927123d272ed07eae0ae51bf70799df44298b47ba0e49a309fd76366875e8d18d73478252931713137844857b8ed5a --- a48c97a1055f2f5a11879d3e8c45c924399bf6e9