Merge pull request #2888

ca18ff64 wallet2: detect spends in txes without a valid public tx key (moneromooo-monero)
6afcd8e3 cn_deserialize: print tx extra fields in partly decoded tx extra (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2017-12-25 21:13:33 +02:00
commit 2d1965f31b
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
2 changed files with 7 additions and 3 deletions

View File

@ -154,7 +154,11 @@ int main(int argc, char* argv[])
std::cout << "Parsed transaction:" << std::endl;
std::cout << cryptonote::obj_to_json_str(tx) << std::endl;
if (cryptonote::parse_tx_extra(tx.extra, fields))
bool parsed = cryptonote::parse_tx_extra(tx.extra, fields);
if (!parsed)
std::cout << "Failed to parse tx_extra" << std::endl;
if (!fields.empty())
{
std::cout << "tx_extra has " << fields.size() << " field(s)" << std::endl;
for (size_t n = 0; n < fields.size(); ++n)
@ -171,7 +175,7 @@ int main(int argc, char* argv[])
}
else
{
std::cout << "Failed to parse tx_extra" << std::endl;
std::cout << "No fields were found in tx_extra" << std::endl;
}
}
else

View File

@ -986,7 +986,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
LOG_PRINT_L0("Public key wasn't found in the transaction extra. Skipping transaction " << txid);
if(0 != m_callback)
m_callback->on_skip_transaction(height, txid, tx);
return;
break;
}
int num_vouts_received = 0;