mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-18 17:45:48 +00:00
return rpc error instead of continuing when ledger header isn't read
This commit is contained in:
@@ -987,9 +987,11 @@ doCatalogueLoad(RPC::JsonContext& context)
|
||||
reinterpret_cast<char*>(&parentCloseTime),
|
||||
sizeof(parentCloseTime)))
|
||||
{
|
||||
JLOG(context.j.warn()) << "Catalogue load expected but could not "
|
||||
"read the next ledger header.";
|
||||
break;
|
||||
JLOG(context.j.warn())
|
||||
<< "Catalogue load expected but could not "
|
||||
<< "read the next ledger header at seq=" << expected_seq << ". "
|
||||
<< "Ledgers prior to this in the file (if any) were loaded.";
|
||||
return rpcError(rpcINTERNAL, "Unexpected end of catalogue file.");
|
||||
}
|
||||
|
||||
info.closeTime = time_point{duration{closeTime}};
|
||||
|
||||
Reference in New Issue
Block a user