mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-28 14:35:48 +00:00
Migrate more code into the chrono type system:
Changes include: * Database::tune and all tune overrides * TaggedCache TargetAge * KeyCache TargetAge
This commit is contained in:
committed by
Nik Bougalis
parent
574ea2c14d
commit
d257d1b2c9
@@ -28,7 +28,7 @@ namespace ripple {
|
||||
namespace NodeStore {
|
||||
|
||||
Shard::Shard(DatabaseShard const& db, std::uint32_t index,
|
||||
int cacheSz, PCache::clock_type::rep cacheAge, beast::Journal& j)
|
||||
int cacheSz, std::chrono::seconds cacheAge, beast::Journal& j)
|
||||
: index_(index)
|
||||
, firstSeq_(db.firstLedgerSeq(index))
|
||||
, lastSeq_(std::max(firstSeq_, db.lastLedgerSeq(index)))
|
||||
@@ -228,8 +228,8 @@ Shard::validate(Application& app)
|
||||
"-" << lastSeq_;
|
||||
|
||||
// Use a short age to keep memory consumption low
|
||||
PCache::clock_type::rep const savedAge {pCache_->getTargetAge()};
|
||||
pCache_->setTargetAge(1);
|
||||
auto const savedAge {pCache_->getTargetAge()};
|
||||
pCache_->setTargetAge(1s);
|
||||
|
||||
// Validate every ledger stored in this shard
|
||||
std::shared_ptr<Ledger const> next;
|
||||
|
||||
Reference in New Issue
Block a user