aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-21 00:22:11 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-04-01 19:31:10 +0000
commit3f1e9e84c0e8259154ad29fb5d8172d9c2e2c60e (patch)
tree7ad9600fe6d5e670cf834694e78f6e97d8522981 /src/wallet/wallet2.cpp
parentwallet_rpc_server: error out on getting the spend key from a hot wallet (diff)
downloadmonero-3f1e9e84c0e8259154ad29fb5d8172d9c2e2c60e.tar.xz
wallet2: set confirmations to 0 for pool txes in proofs
It makes more sense than (uint64_t)-1, which is going to look like very much confirmed when not checking in_pool
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index d59ded49f..60b940163 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -10573,13 +10573,13 @@ void wallet2::check_tx_key_helper(const crypto::hash &txid, const crypto::key_de
check_tx_key_helper(tx, derivation, additional_derivations, address, received);
in_pool = res.txs.front().in_pool;
- confirmations = (uint64_t)-1;
+ confirmations = 0;
if (!in_pool)
{
std::string err;
uint64_t bc_height = get_daemon_blockchain_height(err);
if (err.empty())
- confirmations = bc_height - (res.txs.front().block_height + 1);
+ confirmations = bc_height - res.txs.front().block_height;
}
}
@@ -10775,13 +10775,13 @@ bool wallet2::check_tx_proof(const crypto::hash &txid, const cryptonote::account
return false;
in_pool = res.txs.front().in_pool;
- confirmations = (uint64_t)-1;
+ confirmations = 0;
if (!in_pool)
{
std::string err;
uint64_t bc_height = get_daemon_blockchain_height(err);
if (err.empty())
- confirmations = bc_height - (res.txs.front().block_height + 1);
+ confirmations = bc_height - res.txs.front().block_height;
}
return true;