mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Merge pull request #5108
a873823CAutoFile: Explicit Get() and remove unused methods (Wladimir J. van der Laan)fef24caAdd IsNull() to class CAutoFile and remove operator ! (Ruben Dario Ponticeli)
This commit is contained in:
commit
f984c7d7ad
5 changed files with 31 additions and 24 deletions
|
|
@ -139,7 +139,7 @@ void Shutdown()
|
|||
{
|
||||
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)
|
||||
if (!est_fileout.IsNull())
|
||||
mempool.WriteFeeEstimates(est_fileout);
|
||||
else
|
||||
LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string());
|
||||
|
|
@ -1064,7 +1064,7 @@ bool AppInit2(boost::thread_group& threadGroup)
|
|||
boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
|
||||
CAutoFile est_filein(fopen(est_path.string().c_str(), "rb"), SER_DISK, CLIENT_VERSION);
|
||||
// Allowed to fail as this file IS missing on first startup.
|
||||
if (est_filein)
|
||||
if (!est_filein.IsNull())
|
||||
mempool.ReadFeeEstimates(est_filein);
|
||||
fFeeEstimatesInitialized = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue