mirror of https://github.com/oxen-io/oxen-core.git
Detect and don't try to parse empty txes
If we pass the blob into parse_and_validate_tx_from_blob we get `deserialization or varint failed` error logs, which are harmless bug annoying. This catches the empty tx blob case earlier and logs at a lesser severity.
This commit is contained in:
parent
4d91082acb
commit
b39a118dae
|
@ -1120,6 +1120,12 @@ namespace cryptonote
|
|||
tx_info.tvc.m_too_big = true;
|
||||
return;
|
||||
}
|
||||
else if (tx_info.blob->empty())
|
||||
{
|
||||
LOG_PRINT_L1("WRONG TRANSACTION BLOB, blob is empty, rejected");
|
||||
tx_info.tvc.m_verifivation_failed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
tx_info.parsed = parse_and_validate_tx_from_blob(*tx_info.blob, tx_info.tx, tx_info.tx_hash);
|
||||
if(!tx_info.parsed)
|
||||
|
|
Loading…
Reference in New Issue