MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / UpdateMovingAverages

Method UpdateMovingAverages

src/policy/fees.cpp:231–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231void TxConfirmStats::UpdateMovingAverages()
232{
233 for (unsigned int j = 0; j < buckets.size(); j++) {
234 for (unsigned int i = 0; i < confAvg.size(); i++)
235 confAvg[i][j] = confAvg[i][j] * decay;
236 for (unsigned int i = 0; i < failAvg.size(); i++)
237 failAvg[i][j] = failAvg[i][j] * decay;
238 avg[j] = avg[j] * decay;
239 txCtAvg[j] = txCtAvg[j] * decay;
240 }
241}
242
243// returns -1 on error conditions
244double TxConfirmStats::EstimateMedianVal(int confTarget, double sufficientTxVal,

Callers 1

processBlockMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected