Tests for blockchain-extension crates.
Blockchain crates such as bdk_esplora and bdk_electrum should have comprehensive tests on their extension trait methods (outputs of these methods should be as expected given different scenarios).
Although we want to test the extension methods under the same set of scenarios, the syncing/scanning logic of each example is unique, so we want to check the outputs individually. Additionally, we may change the API of these extension methods so we do not want to deal with the hassle of maintaining additional generic/wrapper code.
We will provide the extension methods real blockchain data via the bitcoind and electrsd crates.
We will maintain a list of scenarios in this ticket description (I will update it via suggestions in the comments below).
Scenarios
- Ensure
stop_gapfunctions correctly. Does the methods correctly process a transaction history with self-sends right at the boundaries of the inputstop_gap? - If we provide the methods with "already-reorged" data, is the output as expected? I.e. Does the returned
SparseChain/ChainGraphcontain checkpoints atagreement_pointandinvalid_fromindexes.
Original ticket: https://github.com/LLFourn/bdk_core_staging/issues/156
@evanlinjin, I will be taking this up
Current code test coverage is good, see current CodeCov stats below.
| crate | Line Coverage | Functions |
|---|---|---|
| bitcoind_rpc | 81.6 % , 129 / 158 | 50.0 % , 15 / 30 |
| electrum | 77.8 % , 273 / 351 | 45.5 % , 20 / 44 |
| esplora/src | 91.3 % , 1023 / 1120 | 54.5 % , 61 / 112 |
Closing this issue but feel free to open new issues on specific areas that need better testing.