Merge pull request #5453

71102267 wallet_rpc_server: set suggested_confirmations_threshold for pool txes (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2019-04-18 21:59:00 +02:00
commit 55807141f2
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
1 changed files with 3 additions and 5 deletions

View File

@ -86,12 +86,10 @@ namespace
void set_confirmations(tools::wallet_rpc::transfer_entry &entry, uint64_t blockchain_height, uint64_t block_reward)
{
if (entry.height >= blockchain_height || (entry.height == 0 && (!strcmp(entry.type.c_str(), "pending") || !strcmp(entry.type.c_str(), "pool"))))
{
entry.confirmations = 0;
entry.suggested_confirmations_threshold = 0;
return;
}
entry.confirmations = blockchain_height - entry.height;
else
entry.confirmations = blockchain_height - entry.height;
if (block_reward == 0)
entry.suggested_confirmations_threshold = 0;
else