]> Untitled Git - bdk/commitdiff
chore(chain)!: rm `From<LocalChain> for BTreeMap<u32, BlockHash>`
author志宇 <hello@evanlinjin.me>
Fri, 5 Apr 2024 07:59:09 +0000 (15:59 +0800)
committer志宇 <hello@evanlinjin.me>
Fri, 5 Apr 2024 08:36:00 +0000 (16:36 +0800)
I don't think this was ever used. The only possible usecase I can think
of is for tests, but I don't think that is a strong enough incentive for
us to keep this.

crates/chain/src/local_chain.rs

index cd1b1de428c818930d1436b9c453c561c4cd9bec..100a9662c5c9081b2f6e0669971ca9dfeae0d037 100644 (file)
@@ -246,17 +246,6 @@ pub struct LocalChain {
     tip: CheckPoint,
 }
 
-// TODO: Figure out whether we can get rid of this
-impl From<LocalChain> for BTreeMap<u32, BlockHash> {
-    fn from(value: LocalChain) -> Self {
-        value
-            .tip
-            .iter()
-            .map(|cp| (cp.height(), cp.hash()))
-            .collect()
-    }
-}
-
 impl ChainOracle for LocalChain {
     type Error = Infallible;