Skip to content

Commit

Permalink
[FOLD] Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelportilla committed Mar 30, 2020
1 parent 78c9abb commit 7630fc0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 47 deletions.
28 changes: 18 additions & 10 deletions src/ripple/nodestore/impl/DatabaseShardImp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,27 @@ DatabaseShardImp::init()
seq))
{
std::uint32_t seq2;
if (get_if_exists<std::uint32_t>(
section,
"earliest_seq", seq2) &&
seq != seq2)
if (get_if_exists<std::uint32_t>(section, "earliest_seq", seq2))
{
return fail("and [" + ConfigSection::nodeDatabase() +
"] both define 'earliest_seq'");
if (seq != seq2)
{
return fail("and [" + ConfigSection::nodeDatabase() +
"] define different 'earliest_seq' values");
}
}
else if (seq != XRP_LEDGER_EARLIEST_SEQ)
{
return fail("doesn't define 'earliest_seq' while ["
+ ConfigSection::nodeDatabase() +"] does");
}
}
else if (get_if_exists<std::uint32_t>(
section, "earliest_seq", seq) &&
seq != XRP_LEDGER_EARLIEST_SEQ)
{
return fail("defines 'earliest_seq' while [" +
ConfigSection::nodeDatabase() + "] doesn't");
}
}

if (!get_if_exists<path>(section, "path", dir_))
Expand Down Expand Up @@ -1249,10 +1261,6 @@ DatabaseShardImp::setFileStats()
std::lock_guard lock(mutex_);
assert(init_);

fileSz_ = 0;
fdRequired_ = 0;
avgShardFileSz_ = 0;

if (shards_.empty())
return;

Expand Down
37 changes: 0 additions & 37 deletions src/ripple/unity/nodestore.cpp

This file was deleted.

0 comments on commit 7630fc0

Please sign in to comment.