@@ -161,13 +161,13 @@ class TxConfirmStats
161
161
unsigned int GetMaxConfirms () const { return scale * confAvg.size (); }
162
162
163
163
/* * Write state of estimation data to a file*/
164
- void Write (CAutoFile & fileout) const ;
164
+ void Write (AutoFile & fileout) const ;
165
165
166
166
/* *
167
167
* Read saved state of estimation data from a file and replace all internal data structures and
168
168
* variables with this state.
169
169
*/
170
- void Read (CAutoFile & filein, int nFileVersion, size_t numBuckets);
170
+ void Read (AutoFile & filein, int nFileVersion, size_t numBuckets);
171
171
};
172
172
173
173
@@ -390,7 +390,7 @@ double TxConfirmStats::EstimateMedianVal(int confTarget, double sufficientTxVal,
390
390
return median;
391
391
}
392
392
393
- void TxConfirmStats::Write (CAutoFile & fileout) const
393
+ void TxConfirmStats::Write (AutoFile & fileout) const
394
394
{
395
395
fileout << Using<EncodedDoubleFormatter>(decay);
396
396
fileout << scale;
@@ -400,7 +400,7 @@ void TxConfirmStats::Write(CAutoFile& fileout) const
400
400
fileout << Using<VectorFormatter<VectorFormatter<EncodedDoubleFormatter>>>(failAvg);
401
401
}
402
402
403
- void TxConfirmStats::Read (CAutoFile & filein, int nFileVersion, size_t numBuckets)
403
+ void TxConfirmStats::Read (AutoFile & filein, int nFileVersion, size_t numBuckets)
404
404
{
405
405
// Read data file and do some very basic sanity checking
406
406
// buckets and bucketMap are not updated yet, so don't access them
@@ -546,7 +546,7 @@ CBlockPolicyEstimator::CBlockPolicyEstimator(const fs::path& estimation_filepath
546
546
longStats = std::unique_ptr<TxConfirmStats>(new TxConfirmStats (buckets, bucketMap, LONG_BLOCK_PERIODS, LONG_DECAY, LONG_SCALE));
547
547
548
548
// 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" )} ;
550
550
if (est_file.IsNull () || !Read (est_file)) {
551
551
LogPrintf (" Failed to read fee estimates from %s. Continue anyway.\n " , fs::PathToString (m_estimation_filepath));
552
552
}
@@ -904,13 +904,13 @@ CFeeRate CBlockPolicyEstimator::estimateSmartFee(int confTarget, FeeCalculation
904
904
void CBlockPolicyEstimator::Flush () {
905
905
FlushUnconfirmed ();
906
906
907
- CAutoFile est_file ( fsbridge::fopen (m_estimation_filepath, " wb" ), SER_DISK, CLIENT_VERSION) ;
907
+ AutoFile est_file{ fsbridge::fopen (m_estimation_filepath, " wb" )} ;
908
908
if (est_file.IsNull () || !Write (est_file)) {
909
909
LogPrintf (" Failed to write fee estimates to %s. Continue anyway.\n " , fs::PathToString (m_estimation_filepath));
910
910
}
911
911
}
912
912
913
- bool CBlockPolicyEstimator::Write (CAutoFile & fileout) const
913
+ bool CBlockPolicyEstimator::Write (AutoFile & fileout) const
914
914
{
915
915
try {
916
916
LOCK (m_cs_fee_estimator);
@@ -935,7 +935,7 @@ bool CBlockPolicyEstimator::Write(CAutoFile& fileout) const
935
935
return true ;
936
936
}
937
937
938
- bool CBlockPolicyEstimator::Read (CAutoFile & filein)
938
+ bool CBlockPolicyEstimator::Read (AutoFile & filein)
939
939
{
940
940
try {
941
941
LOCK (m_cs_fee_estimator);
0 commit comments