mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 23:08:36 +01:00
The `chain::Listen` interface provides a block-connection-based alternative to the `chain::Confirm` interface, which supports providing transaction data at a time separate from the block connection time. For users who are downloading the full headers tree (e.g. from a node over the Bitcoin P2P protocol) but who are not downloading full blocks (e.g. because they're using BIP 157/158 filtering) there is no API that matches exactly their event stream - `chain::Listen` requries full blocks for each block, `chain::Confirm` requires breaking each connection event into two calls. Given its incredibly trivial to take a `TransactionData` in addition to a `Block` in `chain::Listen` we do so here, adding a default-implementation `block_connected` which simply creates the `TransactionData`, which ultimately all of the `chain::Listen` implementations currently do anyway. Closes #1128. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |