mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-23 04:28:52 +00:00
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:
commit
2d1965f31b
@ -154,7 +154,11 @@ int main(int argc, char* argv[])
|
|||||||
std::cout << "Parsed transaction:" << std::endl;
|
std::cout << "Parsed transaction:" << std::endl;
|
||||||
std::cout << cryptonote::obj_to_json_str(tx) << 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;
|
std::cout << "tx_extra has " << fields.size() << " field(s)" << std::endl;
|
||||||
for (size_t n = 0; n < fields.size(); ++n)
|
for (size_t n = 0; n < fields.size(); ++n)
|
||||||
@ -171,7 +175,7 @@ int main(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout << "Failed to parse tx_extra" << std::endl;
|
std::cout << "No fields were found in tx_extra" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -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);
|
LOG_PRINT_L0("Public key wasn't found in the transaction extra. Skipping transaction " << txid);
|
||||||
if(0 != m_callback)
|
if(0 != m_callback)
|
||||||
m_callback->on_skip_transaction(height, txid, tx);
|
m_callback->on_skip_transaction(height, txid, tx);
|
||||||
return;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
int num_vouts_received = 0;
|
int num_vouts_received = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user