mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 14:05:51 +00:00
Introduce ShardArchiveHandler improvements:
* Improve documentation * Make the ShardArchiveHandler rather than the DatabaseShardImp perform LastLedgerHash verification for downloaded shards * Remove ShardArchiveHandler's singleton implementation and make it an Application member * Have the Application invoke ShardArchiveHandler initialization instead of clients * Add RecoveryHandler as a ShardArchiveHandler derived class * Improve commenting
This commit is contained in:
@@ -396,7 +396,7 @@ Shard::isLegacy() const
|
||||
bool
|
||||
Shard::finalize(
|
||||
bool const writeSQLite,
|
||||
boost::optional<uint256> const& referenceHash)
|
||||
boost::optional<uint256> const& expectedHash)
|
||||
{
|
||||
assert(backend_);
|
||||
|
||||
@@ -502,7 +502,7 @@ Shard::finalize(
|
||||
|
||||
// Validate the last ledger hash of a downloaded shard
|
||||
// using a ledger hash obtained from the peer network
|
||||
if (referenceHash && *referenceHash != hash)
|
||||
if (expectedHash && *expectedHash != hash)
|
||||
return fail("invalid last ledger hash");
|
||||
|
||||
// Validate every ledger stored in the backend
|
||||
|
||||
Reference in New Issue
Block a user