@@ -161,13 +161,13 @@ class TxConfirmStats
161161 unsigned int GetMaxConfirms () const { return scale * confAvg.size (); }
162162
163163 /* * Write state of estimation data to a file*/
164- void Write (CAutoFile & fileout) const ;
164+ void Write (AutoFile & fileout) const ;
165165
166166 /* *
167167 * Read saved state of estimation data from a file and replace all internal data structures and
168168 * variables with this state.
169169 */
170- void Read (CAutoFile & filein, int nFileVersion, size_t numBuckets);
170+ void Read (AutoFile & filein, int nFileVersion, size_t numBuckets);
171171};
172172
173173
@@ -390,7 +390,7 @@ double TxConfirmStats::EstimateMedianVal(int confTarget, double sufficientTxVal,
390390 return median;
391391}
392392
393- void TxConfirmStats::Write (CAutoFile & fileout) const
393+ void TxConfirmStats::Write (AutoFile & fileout) const
394394{
395395 fileout << Using<EncodedDoubleFormatter>(decay);
396396 fileout << scale;
@@ -400,7 +400,7 @@ void TxConfirmStats::Write(CAutoFile& fileout) const
400400 fileout << Using<VectorFormatter<VectorFormatter<EncodedDoubleFormatter>>>(failAvg);
401401}
402402
403- void TxConfirmStats::Read (CAutoFile & filein, int nFileVersion, size_t numBuckets)
403+ void TxConfirmStats::Read (AutoFile & filein, int nFileVersion, size_t numBuckets)
404404{
405405 // Read data file and do some very basic sanity checking
406406 // buckets and bucketMap are not updated yet, so don't access them
@@ -546,7 +546,7 @@ CBlockPolicyEstimator::CBlockPolicyEstimator(const fs::path& estimation_filepath
546546 longStats = std::unique_ptr<TxConfirmStats>(new TxConfirmStats (buckets, bucketMap, LONG_BLOCK_PERIODS, LONG_DECAY, LONG_SCALE));
547547
548548 // If the fee estimation file is present, read recorded estimations
549- CAutoFile est_file ( fsbridge::fopen (m_estimation_filepath, " rb" ), SER_DISK, CLIENT_VERSION) ;
549+ AutoFile est_file{ fsbridge::fopen (m_estimation_filepath, " rb" )} ;
550550 if (est_file.IsNull () || !Read (est_file)) {
551551 LogPrintf (" Failed to read fee estimates from %s. Continue anyway.\n " , fs::PathToString (m_estimation_filepath));
552552 }
@@ -904,13 +904,13 @@ CFeeRate CBlockPolicyEstimator::estimateSmartFee(int confTarget, FeeCalculation
904904void CBlockPolicyEstimator::Flush () {
905905 FlushUnconfirmed ();
906906
907- CAutoFile est_file ( fsbridge::fopen (m_estimation_filepath, " wb" ), SER_DISK, CLIENT_VERSION) ;
907+ AutoFile est_file{ fsbridge::fopen (m_estimation_filepath, " wb" )} ;
908908 if (est_file.IsNull () || !Write (est_file)) {
909909 LogPrintf (" Failed to write fee estimates to %s. Continue anyway.\n " , fs::PathToString (m_estimation_filepath));
910910 }
911911}
912912
913- bool CBlockPolicyEstimator::Write (CAutoFile & fileout) const
913+ bool CBlockPolicyEstimator::Write (AutoFile & fileout) const
914914{
915915 try {
916916 LOCK (m_cs_fee_estimator);
@@ -935,7 +935,7 @@ bool CBlockPolicyEstimator::Write(CAutoFile& fileout) const
935935 return true ;
936936}
937937
938- bool CBlockPolicyEstimator::Read (CAutoFile & filein)
938+ bool CBlockPolicyEstimator::Read (AutoFile & filein)
939939{
940940 try {
941941 LOCK (m_cs_fee_estimator);
0 commit comments