We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b5fea5 commit 751ce6dCopy full SHA for 751ce6d
src/database/memory.rs
@@ -508,10 +508,13 @@ macro_rules! populate_test_db {
508
};
509
510
let txid = tx.txid();
511
- let confirmation_time = tx_meta.min_confirmations.map(|conf| $crate::BlockTime {
512
- height: current_height.unwrap().checked_sub(conf as u32).unwrap(),
513
- timestamp: 0,
514
- });
+ let confirmation_time = tx_meta
+ .min_confirmations
+ .and_then(|v| if v == 0 { None } else { Some(v) })
+ .map(|conf| $crate::BlockTime {
515
+ height: current_height.unwrap().checked_sub(conf as u32).unwrap(),
516
+ timestamp: 0,
517
+ });
518
519
let tx_details = $crate::TransactionDetails {
520
transaction: Some(tx.clone()),
0 commit comments