mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
LedgerMaster hash lookups return boost::optional.
This commit is contained in:
committed by
Nik Bougalis
parent
e1018546ac
commit
4d2e7ed404
@@ -162,11 +162,12 @@ bool isValidated (LedgerMaster& ledgerMaster, ReadView const& ledger,
|
||||
// validated).
|
||||
auto hash = ledgerMaster.walkHashBySeq (seq);
|
||||
|
||||
if (ledger.info().hash != hash)
|
||||
if (!hash || ledger.info().hash != *hash)
|
||||
{
|
||||
// This ledger's hash is not the hash of the validated ledger
|
||||
if (hash.isNonZero ())
|
||||
if (hash)
|
||||
{
|
||||
assert(hash->isNonZero());
|
||||
uint256 valHash = getHashByIndex (seq, app);
|
||||
if (valHash == ledger.info().hash)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user