diff --git a/src/ripple/nodestore/impl/DatabaseShardImp.cpp b/src/ripple/nodestore/impl/DatabaseShardImp.cpp index 8bb57b97873..d3257fc131e 100644 --- a/src/ripple/nodestore/impl/DatabaseShardImp.cpp +++ b/src/ripple/nodestore/impl/DatabaseShardImp.cpp @@ -92,15 +92,27 @@ DatabaseShardImp::init() seq)) { std::uint32_t seq2; - if (get_if_exists( - section, - "earliest_seq", seq2) && - seq != seq2) + if (get_if_exists(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( + section, "earliest_seq", seq) && + seq != XRP_LEDGER_EARLIEST_SEQ) + { + return fail("defines 'earliest_seq' while [" + + ConfigSection::nodeDatabase() + "] doesn't"); + } } if (!get_if_exists(section, "path", dir_)) @@ -1249,10 +1261,6 @@ DatabaseShardImp::setFileStats() std::lock_guard lock(mutex_); assert(init_); - fileSz_ = 0; - fdRequired_ = 0; - avgShardFileSz_ = 0; - if (shards_.empty()) return; diff --git a/src/ripple/unity/nodestore.cpp b/src/ripple/unity/nodestore.cpp deleted file mode 100644 index 5ea62a3675f..00000000000 --- a/src/ripple/unity/nodestore.cpp +++ /dev/null @@ -1,37 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of rippled: https://github.com/ripple/rippled - Copyright (c) 2012, 2013 Ripple Labs Inc. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include