]> Untitled Git - bdk/commit
[blockchain] Simplify the architecture of blockchain traits
authorAlekos Filini <alekos.filini@gmail.com>
Wed, 9 Sep 2020 16:17:49 +0000 (18:17 +0200)
committerAlekos Filini <alekos.filini@gmail.com>
Thu, 10 Sep 2020 08:45:07 +0000 (10:45 +0200)
commitefdd11762c70c47785d7dbc4a0d12a5db5493c35
treea00a637d935ef2f0c359b565efebcd68c7b6a0f0
parent24fcb385655c4c9ede8dc206d21f46a46f1a0d78
[blockchain] Simplify the architecture of blockchain traits

Instead of having two traits, `Blockchain` and `OnlineBlockchain` that need
to be implemented by the user, only the relevant one (`OnlineBlockchain`, here
renamed to `Blockchain`) will need to be implemented, since we provide a
blanket implementation for the "marker" trait (previously `Blockchain`, here
renamed to `BlockchainMarker`).

Users of the library will probably never need to implement `BlockchainMarker`
by itself, since we expose the `OfflineBlockchain` type that already does
that and should be good for any "offline" wallet. Still, it's exposed since
they might need to import it to define types with generics.
src/blockchain/compact_filters/mod.rs
src/blockchain/compact_filters/peer.rs
src/blockchain/electrum.rs
src/blockchain/esplora.rs
src/blockchain/mod.rs
src/cli.rs
src/wallet/export.rs
src/wallet/mod.rs
testutils-macros/src/lib.rs