Remove verify flag from TransactionDetails

This commit is contained in:
rajarshimaitra 2021-12-16 21:06:59 +05:30
parent acbf0ae08e
commit 08f312a82f
No known key found for this signature in database
GPG Key ID: 558ACE7DBB4377C8
7 changed files with 0 additions and 15 deletions

View File

@ -271,7 +271,6 @@ impl Blockchain for RpcBlockchain {
received, received,
sent, sent,
fee: tx_result.fee.map(|f| f.as_sat().abs() as u64), fee: tx_result.fee.map(|f| f.as_sat().abs() as u64),
verified: true,
}; };
debug!( debug!(
"saving tx: {} tx_result.fee:{:?} td.fees:{:?}", "saving tx: {} tx_result.fee:{:?} td.fees:{:?}",

View File

@ -214,7 +214,6 @@ impl<'a, D: BatchDatabase> TxReq<'a, D> {
// we're going to fill this in later // we're going to fill this in later
confirmation_time: None, confirmation_time: None,
fee: Some(fee), fee: Some(fee),
verified: false,
}) })
}) })
.collect::<Result<Vec<_>, _>>()?; .collect::<Result<Vec<_>, _>>()?;

View File

@ -515,7 +515,6 @@ macro_rules! populate_test_db {
received: 0, received: 0,
sent: 0, sent: 0,
confirmation_time, confirmation_time,
verified: current_height.is_some(),
}; };
db.set_tx(&tx_details).unwrap(); db.set_tx(&tx_details).unwrap();

View File

@ -348,7 +348,6 @@ pub mod test {
timestamp: 123456, timestamp: 123456,
height: 1000, height: 1000,
}), }),
verified: true,
}; };
tree.set_tx(&tx_details).unwrap(); tree.set_tx(&tx_details).unwrap();

View File

@ -211,15 +211,6 @@ pub struct TransactionDetails {
/// If the transaction is confirmed, contains height and timestamp of the block containing the /// If the transaction is confirmed, contains height and timestamp of the block containing the
/// transaction, unconfirmed transaction contains `None`. /// transaction, unconfirmed transaction contains `None`.
pub confirmation_time: Option<BlockTime>, 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 /// Block height and timestamp of a block

View File

@ -230,7 +230,6 @@ mod test {
timestamp: 12345678, timestamp: 12345678,
height: 5000, height: 5000,
}), }),
verified: true,
}) })
.unwrap(); .unwrap();

View File

@ -712,7 +712,6 @@ where
received, received,
sent, sent,
fee: Some(fee_amount), fee: Some(fee_amount),
verified: true,
}; };
Ok((psbt, transaction_details)) Ok((psbt, transaction_details))