mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Merge pull request #4501
954d2e7
Avoid a segfault on getblock if it can't read a block from disk. (Ruben Dario Ponticelli)
This commit is contained in:
commit
f0fc81a083
@ -276,7 +276,9 @@ Value getblock(const Array& params, bool fHelp)
|
||||
|
||||
CBlock block;
|
||||
CBlockIndex* pblockindex = mapBlockIndex[hash];
|
||||
ReadBlockFromDisk(block, pblockindex);
|
||||
|
||||
if(!ReadBlockFromDisk(block, pblockindex))
|
||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "Can't read block from disk");
|
||||
|
||||
if (!fVerbose)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user