mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-17 18:40:09 +00:00
Make sure CAutoFile for fees estimate goes out of scope
This commit is contained in:
parent
87e40799fd
commit
09c744c2a8
14
src/init.cpp
14
src/init.cpp
@ -127,12 +127,14 @@ void Shutdown()
|
|||||||
StopNode();
|
StopNode();
|
||||||
UnregisterNodeSignals(GetNodeSignals());
|
UnregisterNodeSignals(GetNodeSignals());
|
||||||
|
|
||||||
boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
|
{
|
||||||
CAutoFile est_fileout = CAutoFile(fopen(est_path.string().c_str(), "wb"), SER_DISK, CLIENT_VERSION);
|
boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
|
||||||
if (est_fileout)
|
CAutoFile est_fileout(fopen(est_path.string().c_str(), "wb"), SER_DISK, CLIENT_VERSION);
|
||||||
mempool.WriteFeeEstimates(est_fileout);
|
if (est_fileout)
|
||||||
else
|
mempool.WriteFeeEstimates(est_fileout);
|
||||||
LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string());
|
else
|
||||||
|
LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string());
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user