mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
before getting block, check if it exist using its hash
This commit is contained in:
parent
9fb47b3cda
commit
ede2ad9556
1 changed files with 8 additions and 0 deletions
|
@ -122,6 +122,14 @@ namespace xmreg
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!m_blockchain_storage.have_block(block_id))
|
||||||
|
{
|
||||||
|
cerr << "Block with hash " << block_id
|
||||||
|
<< " not found in the blockchain!"
|
||||||
|
<< endl;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!m_blockchain_storage.get_block_by_hash(block_id, blk))
|
if (!m_blockchain_storage.get_block_by_hash(block_id, blk))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue