diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-07-17 13:35:29 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-07-17 13:41:21 +0200 |
| commit | 00b16bc9428e2008fd03c1cea6327d9278535ef3 (patch) | |
| tree | b3a4cd5478623315dc99fbff2259dd6278f67581 /src/init.cpp | |
| parent | Merge pull request #4535 (diff) | |
| parent | Make sure CAutoFile for fees estimate goes out of scope (diff) | |
| download | discoin-00b16bc9428e2008fd03c1cea6327d9278535ef3.tar.xz discoin-00b16bc9428e2008fd03c1cea6327d9278535ef3.zip | |
Merge pull request #4546
09c744c Make sure CAutoFile for fees estimate goes out of scope (Pieter Wuille)
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/init.cpp b/src/init.cpp index 07960ee37..b80d718f0 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -127,12 +127,14 @@ void Shutdown() StopNode(); 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); - if (est_fileout) - mempool.WriteFeeEstimates(est_fileout); - else - LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string()); + { + boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME; + CAutoFile est_fileout(fopen(est_path.string().c_str(), "wb"), SER_DISK, CLIENT_VERSION); + if (est_fileout) + mempool.WriteFeeEstimates(est_fileout); + else + LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string()); + } { LOCK(cs_main); |