From: 志宇 Date: Fri, 7 Apr 2023 01:23:00 +0000 (+0800) Subject: [bdk_chain_redesign] Improve `BlockAnchor` docs X-Git-Tag: v1.0.0-alpha.1~19^2~23 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/struct.ScriptPath.html?a=commitdiff_plain;h=bff80ec378fab29556099f9830bcb42911658710;p=bdk [bdk_chain_redesign] Improve `BlockAnchor` docs --- diff --git a/crates/chain/src/tx_data_traits.rs b/crates/chain/src/tx_data_traits.rs index d8cadd13..1399ebeb 100644 --- a/crates/chain/src/tx_data_traits.rs +++ b/crates/chain/src/tx_data_traits.rs @@ -34,9 +34,12 @@ impl ForEachTxOut for Transaction { } } -/// Trait that "anchors" blockchain data in a specific block of height and hash. +/// Trait that "anchors" blockchain data to a specific block of height and hash. /// -/// This trait is typically associated with blockchain data such as transactions. +/// I.e. If transaction A is anchored in block B, then if block B is in the best chain, we can +/// assume that transaction A is also confirmed in the best chain. This does not necessarily mean +/// that transaction A is confirmed in block B. It could also mean transaction A is confirmed in a +/// parent block of B. pub trait BlockAnchor: core::fmt::Debug + Clone + Eq + PartialOrd + Ord + core::hash::Hash + Send + Sync + 'static {