mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
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
This commit is contained in:
parent
36c037ec47
commit
3f1e9e84c0
1 changed files with 4 additions and 4 deletions
|
@ -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);
|
check_tx_key_helper(tx, derivation, additional_derivations, address, received);
|
||||||
|
|
||||||
in_pool = res.txs.front().in_pool;
|
in_pool = res.txs.front().in_pool;
|
||||||
confirmations = (uint64_t)-1;
|
confirmations = 0;
|
||||||
if (!in_pool)
|
if (!in_pool)
|
||||||
{
|
{
|
||||||
std::string err;
|
std::string err;
|
||||||
uint64_t bc_height = get_daemon_blockchain_height(err);
|
uint64_t bc_height = get_daemon_blockchain_height(err);
|
||||||
if (err.empty())
|
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;
|
return false;
|
||||||
|
|
||||||
in_pool = res.txs.front().in_pool;
|
in_pool = res.txs.front().in_pool;
|
||||||
confirmations = (uint64_t)-1;
|
confirmations = 0;
|
||||||
if (!in_pool)
|
if (!in_pool)
|
||||||
{
|
{
|
||||||
std::string err;
|
std::string err;
|
||||||
uint64_t bc_height = get_daemon_blockchain_height(err);
|
uint64_t bc_height = get_daemon_blockchain_height(err);
|
||||||
if (err.empty())
|
if (err.empty())
|
||||||
confirmations = bc_height - (res.txs.front().block_height + 1);
|
confirmations = bc_height - res.txs.front().block_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue