|
|
@ -25,6 +25,7 @@ |
|
|
|
#include "netbase.h" |
|
|
|
#include "netbase.h" |
|
|
|
#include "net.h" |
|
|
|
#include "net.h" |
|
|
|
#include "net_processing.h" |
|
|
|
#include "net_processing.h" |
|
|
|
|
|
|
|
#include "policy/fees.h" |
|
|
|
#include "policy/policy.h" |
|
|
|
#include "policy/policy.h" |
|
|
|
#include "rpc/server.h" |
|
|
|
#include "rpc/server.h" |
|
|
|
#include "rpc/register.h" |
|
|
|
#include "rpc/register.h" |
|
|
@ -215,7 +216,7 @@ void Shutdown() |
|
|
|
fs::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME; |
|
|
|
fs::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME; |
|
|
|
CAutoFile est_fileout(fsbridge::fopen(est_path, "wb"), SER_DISK, CLIENT_VERSION); |
|
|
|
CAutoFile est_fileout(fsbridge::fopen(est_path, "wb"), SER_DISK, CLIENT_VERSION); |
|
|
|
if (!est_fileout.IsNull()) |
|
|
|
if (!est_fileout.IsNull()) |
|
|
|
mempool.WriteFeeEstimates(est_fileout); |
|
|
|
::feeEstimator.Write(est_fileout); |
|
|
|
else |
|
|
|
else |
|
|
|
LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string()); |
|
|
|
LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string()); |
|
|
|
fFeeEstimatesInitialized = false; |
|
|
|
fFeeEstimatesInitialized = false; |
|
|
@ -1550,7 +1551,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler) |
|
|
|
CAutoFile est_filein(fsbridge::fopen(est_path, "rb"), SER_DISK, CLIENT_VERSION); |
|
|
|
CAutoFile est_filein(fsbridge::fopen(est_path, "rb"), SER_DISK, CLIENT_VERSION); |
|
|
|
// Allowed to fail as this file IS missing on first startup.
|
|
|
|
// Allowed to fail as this file IS missing on first startup.
|
|
|
|
if (!est_filein.IsNull()) |
|
|
|
if (!est_filein.IsNull()) |
|
|
|
mempool.ReadFeeEstimates(est_filein); |
|
|
|
::feeEstimator.Read(est_filein); |
|
|
|
fFeeEstimatesInitialized = true; |
|
|
|
fFeeEstimatesInitialized = true; |
|
|
|
|
|
|
|
|
|
|
|
// ********************************************************* Step 8: load wallet
|
|
|
|
// ********************************************************* Step 8: load wallet
|
|
|
|