]> Untitled Git - bdk/commitdiff
Remove `verify` flag from `TransactionDetails`
authorrajarshimaitra <rajarshi149@gmail.com>
Thu, 16 Dec 2021 15:36:59 +0000 (21:06 +0530)
committerrajarshimaitra <rajarshi149@gmail.com>
Wed, 9 Feb 2022 06:59:47 +0000 (12:29 +0530)
src/blockchain/rpc.rs
src/blockchain/script_sync.rs
src/database/memory.rs
src/database/mod.rs
src/types.rs
src/wallet/export.rs
src/wallet/mod.rs

index 5c9ee2dd7e1d5f8a5a499b6badacd7b84df2ae85..74ef8262846a397afedf8d304a283f3918ddc4ef 100644 (file)
@@ -271,7 +271,6 @@ impl Blockchain for RpcBlockchain {
                     received,
                     sent,
                     fee: tx_result.fee.map(|f| f.as_sat().abs() as u64),
-                    verified: true,
                 };
                 debug!(
                     "saving tx: {} tx_result.fee:{:?} td.fees:{:?}",
index 4c9b02227e279c92ee3c2f4d13a107c021176556..0d450ef17970a2706540636e655ed33b8f7886d4 100644 (file)
@@ -214,7 +214,6 @@ impl<'a, D: BatchDatabase> TxReq<'a, D> {
                     // we're going to fill this in later
                     confirmation_time: None,
                     fee: Some(fee),
-                    verified: false,
                 })
             })
             .collect::<Result<Vec<_>, _>>()?;
index 916ddcbabd2b2c600d0e3a0db9d7aa64da1ede01..afde6fee1d12131c19d51032dc1a1921536ad0c3 100644 (file)
@@ -515,7 +515,6 @@ macro_rules! populate_test_db {
             received: 0,
             sent: 0,
             confirmation_time,
-            verified: current_height.is_some(),
         };
 
         db.set_tx(&tx_details).unwrap();
index b0b9c9ea982be84c35e6af138fb1f66f27db06ca..2318dcc9d75e1ea762d698296bbd3e0b707b880b 100644 (file)
@@ -348,7 +348,6 @@ pub mod test {
                 timestamp: 123456,
                 height: 1000,
             }),
-            verified: true,
         };
 
         tree.set_tx(&tx_details).unwrap();
index f9f34427108621357b3f8ba7a27f79d346add07b..eadfc57b30440939ce1d08359c0ea14a177eb5b6 100644 (file)
@@ -211,15 +211,6 @@ pub struct TransactionDetails {
     /// If the transaction is confirmed, contains height and timestamp of the block containing the
     /// transaction, unconfirmed transaction contains `None`.
     pub confirmation_time: Option<BlockTime>,
-    /// Whether the tx has been verified against the consensus rules
-    ///
-    /// Confirmed txs are considered "verified" by default, while unconfirmed txs are checked to
-    /// ensure an unstrusted [`Blockchain`](crate::blockchain::Blockchain) backend can't trick the
-    /// wallet into using an invalid tx as an RBF template.
-    ///
-    /// The check is only performed when the `verify` feature is enabled.
-    #[serde(default = "bool::default")] // default to `false` if not specified
-    pub verified: bool,
 }
 
 /// Block height and timestamp of a block
index e39d178ea3d45085ebf7a4aff63123c9b74fd3f5..85898345fba077d29408060cdf0e49c7aea6e45f 100644 (file)
@@ -230,7 +230,6 @@ mod test {
                 timestamp: 12345678,
                 height: 5000,
             }),
-            verified: true,
         })
         .unwrap();
 
index 8c3c968b724506eadbada83ce1e2da3ae794e9b9..a24f922dcddebe13b6cb8a32760b68b94052ca51 100644 (file)
@@ -712,7 +712,6 @@ where
             received,
             sent,
             fee: Some(fee_amount),
-            verified: true,
         };
 
         Ok((psbt, transaction_details))