From febe9076f011dc1427c04edf5381530a7c097d6f Mon Sep 17 00:00:00 2001 From: Roy Blankman Date: Wed, 19 Sep 2018 11:55:03 -0400 Subject: [PATCH] fixes #1507 - proper tx confirmation calculation (#1552) when self.height == current_height, # of confirmations should be 1 not 0 --- wallet/src/libwallet/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wallet/src/libwallet/types.rs b/wallet/src/libwallet/types.rs index 614a04eee..c051c99a4 100644 --- a/wallet/src/libwallet/types.rs +++ b/wallet/src/libwallet/types.rs @@ -248,7 +248,7 @@ impl OutputData { /// so we do not actually know how many confirmations this output had (and /// never will). pub fn num_confirmations(&self, current_height: u64) -> u64 { - if self.height >= current_height { + if self.height > current_height { return 0; } if self.status == OutputStatus::Unconfirmed {