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