cryptonote: block parsing + hash calculation speedup

This saves a duplicate serialization step
This commit is contained in:
moneromooo-monero
2018-12-13 19:47:47 +00:00
parent 11604b6da6
commit 547a9708de
6 changed files with 43 additions and 16 deletions
+2 -1
View File
@@ -1432,7 +1432,8 @@ namespace cryptonote
block lb;
if (!b)
{
if(!parse_and_validate_block_from_blob(block_blob, lb))
crypto::hash block_hash;
if(!parse_and_validate_block_from_blob(block_blob, lb, block_hash))
{
LOG_PRINT_L1("Failed to parse and validate new block");
bvc.m_verifivation_failed = true;