rpc: is_key_image_spent now checks the tx pool too

This commit is contained in:
moneromooo-monero 2016-01-05 21:57:43 +00:00
parent 10cc6a8593
commit a44d94d390
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
3 changed files with 40 additions and 4 deletions

View file

@ -1419,15 +1419,15 @@ void wallet2::rescan_spent()
for (size_t i = 0; i < m_transfers.size(); ++i)
{
transfer_details& td = m_transfers[i];
if (td.m_spent != daemon_resp.spent_status[i])
if (td.m_spent != (daemon_resp.spent_status[i] != COMMAND_RPC_IS_KEY_IMAGE_SPENT::UNSPENT))
{
if (td.m_spent)
{
LOG_PRINT_L1("Marking output " << i << " as unspent, it was marked as spent");
LOG_PRINT_L0("Marking output " << i << "(" << td.m_key_image << ") as unspent, it was marked as spent");
}
else
{
LOG_PRINT_L1("Marking output " << i << " as spent, it was marked as unspent");
LOG_PRINT_L0("Marking output " << i << "(" << td.m_key_image << ") as spent, it was marked as unspent");
}
td.m_spent = daemon_resp.spent_status[i];
}