Remove verify flag from TransactionDetails
				
					
				
			This commit is contained in:
		
							parent
							
								
									acbf0ae08e
								
							
						
					
					
						commit
						08f312a82f
					
				| @ -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:{:?}", | ||||||
|  | |||||||
| @ -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<_>, _>>()?; | ||||||
|  | |||||||
| @ -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(); | ||||||
|  | |||||||
| @ -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(); | ||||||
|  | |||||||
| @ -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
 | ||||||
|  | |||||||
| @ -230,7 +230,6 @@ mod test { | |||||||
|                 timestamp: 12345678, |                 timestamp: 12345678, | ||||||
|                 height: 5000, |                 height: 5000, | ||||||
|             }), |             }), | ||||||
|             verified: true, |  | ||||||
|         }) |         }) | ||||||
|         .unwrap(); |         .unwrap(); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -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)) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user