Remove the state file for the random number generator

This commit is contained in:
Markus Teufelberger
2018-11-03 16:18:03 +01:00
committed by Nik Bougalis
parent cb71d493a0
commit 5e96da51f9
5 changed files with 0 additions and 118 deletions

View File

@@ -30,7 +30,6 @@
#include <ripple/core/DatabaseCon.h>
#include <ripple/core/TerminateHandler.h>
#include <ripple/core/TimeKeeper.h>
#include <ripple/crypto/csprng.h>
#include <ripple/json/to_string.h>
#include <ripple/net/RPCCall.h>
#include <ripple/resource/Fees.h>
@@ -68,15 +67,6 @@ namespace po = boost::program_options;
namespace ripple {
boost::filesystem::path
getEntropyFile(Config const& config)
{
auto const path = config.legacy("database_path");
if (path.empty ())
return {};
return boost::filesystem::path (path) / "random.seed";
}
bool
adjustDescriptorLimit(int needed, beast::Journal j)
{
@@ -489,13 +479,6 @@ int run (int argc, char** argv)
config->setup (configFile, bool (vm.count ("quiet")),
bool(vm.count("silent")), bool(vm.count("standalone")));
{
// Stir any previously saved entropy into the pool:
auto entropy = getEntropyFile (*config);
if (!entropy.empty ())
crypto_prng().load_state(entropy.string ());
}
if (vm.count("vacuum"))
{
DatabaseCon::Setup dbSetup = setup_DatabaseCon(*config);
@@ -738,11 +721,6 @@ int run (int argc, char** argv)
// Block until we get a stop RPC.
app->run();
// Try to write out some entropy to use the next time we start.
auto entropy = getEntropyFile (app->config());
if (!entropy.empty ())
crypto_prng().save_state(entropy.string ());
return 0;
}