mirror of
https://github.com/dogecoin/dogecoin.git
synced 2026-02-25 06:39:01 +00:00
Merge pull request #681 from rnicoll/1.8.1-dev-getblock-segfault
"getblock" RPC call now handles load failure
This commit is contained in:
commit
26f8bc3d2b
@ -312,7 +312,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…
x
Reference in New Issue
Block a user