rippled
Loading...
Searching...
No Matches
LedgerCleaner.h
1#pragma once
2
3#include <xrpld/app/main/Application.h>
4
5#include <xrpl/beast/utility/Journal.h>
6#include <xrpl/beast/utility/PropertyStream.h>
7#include <xrpl/json/json_value.h>
8
9namespace xrpl {
10
13{
14protected:
15 LedgerCleaner() : beast::PropertyStream::Source("ledgercleaner")
16 {
17 }
18
19public:
20 virtual ~LedgerCleaner() = default;
21
22 virtual void
23 start() = 0;
24
25 virtual void
26 stop() = 0;
27
38 virtual void
39 clean(Json::Value const& parameters) = 0;
40};
41
44
45} // namespace xrpl
Represents a JSON value.
Definition json_value.h:130
A generic endpoint for log messages.
Definition Journal.h:40
Subclasses can be called to write to a stream and have children.
Check the ledger/transaction databases to make sure they have continuity.
virtual void clean(Json::Value const &parameters)=0
Start a long running task to clean the ledger.
virtual ~LedgerCleaner()=default
virtual void stop()=0
virtual void start()=0
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
std::unique_ptr< LedgerCleaner > make_LedgerCleaner(Application &app, beast::Journal journal)