-
Notifications
You must be signed in to change notification settings - Fork 404
Commit a48c97a
committed
Merge #1988: Detect new mempool txs
51ee99a docs(bitcoind_rpc): fixed typo in docs (Wei Chen)
73ab1eb chore(bitcoind_rpc): Make clippy happy (志宇)
7e894f4 feat(bitcoind_rpc)!: Use `getrawmempool` without verbose (志宇)
05464ec fix(bitcoind_rpc)!: Simplify emitter (志宇)
67dfb0b 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`](bitcoindevkit/bdk_wallet#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 51ee99a
LagginTimes:
Re-ACK 51ee99a
Tree-SHA512: 04e180e1d28c3f4c581a61ccac95e8e7e6927123d272ed07eae0ae51bf70799df44298b47ba0e49a309fd76366875e8d18d73478252931713137844857b8ed5aFile tree
Expand file treeCollapse file tree
3 files changed
+199
-421
lines changedFilter options
- crates/bitcoind_rpc
- src
- tests
- examples/example_bitcoind_rpc_polling/src
Expand file treeCollapse file tree
3 files changed
+199
-421
lines changed
0 commit comments