|
Ran
|
Files
30
|
Run time
0s
|
Badge
README BADGES
|
push
github
Merge bitcoindevkit/bdk#1857: feat(rpc)!: Update `Emitter::mempool` to support `evicted_at` 8513d83a2 feat(bitcoind_rpc)!: Reduce friction of `Emitter` API. (志宇) 0a02d2683 feat(chain): Add convenience conversions for `CanonicalTx` (志宇) d11f6efe8 feat(graph): add convenience function for inserting relevant `evicted_at`s (Wei Chen) 28ef7c9a2 refactor(rpc)!: update `mempool` interface and test code (valued mammal) Pull request description: Fixes #1740 ### Description Work for this began as part of #1811, based on this [comment](https://github.com/bitcoindevkit/bdk/pull/1811#discussion_r1945941691). `Emitter::mempool` now returns a `MempoolEvent` which provides the data for tracking `evicted_at`: ``` pub struct MempoolEvent { /// Unemitted transactions or transactions with ancestors that are unseen by the receiver. /// /// To understand the second condition, consider a receiver which filters transactions based on /// whether it alters the UTXO set of tracked script pubkeys. If an emitted mempool transaction /// spends a tracked UTXO which is confirmed at height `h`, but the receiver has only seen up to /// block of height `h-1`, we want to re-emit this transaction until the receiver has seen the /// block at height `h`. pub new_txs: Vec<(Transaction, u64)>, /// [`Txid`]s of all transactions that have been evicted from mempool. pub evicted_txids: HashSet<Txid>, /// The latest timestamp of when a transaction entered the mempool. /// /// This is useful for setting the timestamp for evicted transactions. pub latest_update_time: u64, } ``` ### Changelog notice * Change `Emitter::mempool` to return `MempoolEvent`s which contain mempool-eviction data. * Change `Emitter::client` to have more relaxed generic bounds. `C: Deref, ... (continued)
5301 of 6413 relevant lines covered (82.66%)
31198.14 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|