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:
Devon White
2020-05-15 17:21:16 -04:00
committed by manojsdoshi
parent 21340a1c1e
commit ac766ec0eb
22 changed files with 977 additions and 926 deletions

View File

@@ -29,7 +29,7 @@
namespace ripple {
namespace test {
class SSLHTTPDownloader_test : public beast::unit_test::suite
class DatabaseDownloader_test : public beast::unit_test::suite
{
TrustedPublisherServer
createServer(jtx::Env& env, bool ssl = true)
@@ -80,7 +80,7 @@ class SSLHTTPDownloader_test : public beast::unit_test::suite
{
test::StreamSink sink_;
beast::Journal journal_;
// The SSLHTTPDownloader must be created as shared_ptr
// The DatabaseDownloader must be created as shared_ptr
// because it uses shared_from_this
std::shared_ptr<DatabaseDownloader> ptr_;
@@ -265,6 +265,6 @@ public:
}
};
BEAST_DEFINE_TESTSUITE(SSLHTTPDownloader, net, ripple);
BEAST_DEFINE_TESTSUITE(DatabaseDownloader, net, ripple);
} // namespace test
} // namespace ripple