Change wallet to not try to extract tx public key when tx has no outputs (fixes 202612 tx format messages and is otherwise correct)

This commit is contained in:
iamsmooth 2014-09-13 04:25:33 +00:00
parent 08205f01d9
commit 6b77e8358c
1 changed files with 49 additions and 45 deletions

View File

@ -109,6 +109,9 @@ void wallet2::process_new_transaction(const cryptonote::transaction& tx, uint64_
LOG_PRINT_L0("Transaction extra has unsupported format: " << get_transaction_hash(tx));
}
// Don't try to extract tx public key if tx has no ouputs
if (!tx.vout.empty())
{
tx_extra_pub_key pub_key_field;
if(!find_tx_extra_field_by_type(tx_extra_fields, pub_key_field))
{
@ -160,6 +163,7 @@ void wallet2::process_new_transaction(const cryptonote::transaction& tx, uint64_
m_callback->on_money_received(height, td.m_tx, td.m_internal_output_index);
}
}
}
uint64_t tx_money_spent_in_ins = 0;
// check all outputs for spending (compare key images)