]> Untitled Git - bdk/commit
`Blockchain` stop_gap testing improvements
author志宇 <hello@evanlinjin.me>
Mon, 4 Jul 2022 12:37:21 +0000 (20:37 +0800)
committer志宇 <hello@evanlinjin.me>
Mon, 4 Jul 2022 23:53:19 +0000 (07:53 +0800)
commit612da165f8cfbc2b0aee0a37b2cdc44d6da017c8
tree2f716f1e7aa7551437bbc9b4112a92f63de7551e
parent8a5f89e129d421a41af02ea85383d5b82f5ff665
`Blockchain` stop_gap testing improvements

This is a continuation of the #651 fix. We should also check whether the
same bug affects esplora as noted by @afilini. To achieve this, I've
introduced a `ConfigurableBlockchainTester` trait that can test multiple
blockchain implementations.

* Introduce `ConfigurableBlockchainTester` trait.
* Use the aforementioned trait to also test esplora.
* Change the electrum test to also use the new trait.
* Fix some complaints by clippy in ureq.rs file (why is CI not seeing
  this?).
* Refactor some code.
src/blockchain/electrum.rs
src/blockchain/esplora/mod.rs
src/blockchain/esplora/ureq.rs
src/testutils/configurable_blockchain_tests.rs [new file with mode: 0644]
src/testutils/mod.rs