tx_pool: guard against failure getting tx hash

Should be impossible in practice, but easy change

CID 175282
This commit is contained in:
moneromooo-monero 2017-09-10 12:26:24 +01:00
parent 54cc209a5e
commit 50e096987b
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 2 additions and 1 deletions

View File

@ -298,7 +298,8 @@ namespace cryptonote
{
crypto::hash h = null_hash;
size_t blob_size = 0;
get_transaction_hash(tx, h, blob_size);
if (!get_transaction_hash(tx, h, blob_size) || blob_size == 0)
return false;
return add_tx(tx, h, blob_size, tvc, keeped_by_block, relayed, do_not_relay, version);
}
//---------------------------------------------------------------------------------