CalculatePercentilesByWeight

Used by getblockstats to get feerates at different percentiles by weight

Synopsis

Declared in <rpc/blockchain.h>

void
CalculatePercentilesByWeight(
    CAmount result[],
    std::vector<std::pair<CAmount, int64_t>>& scores,
    int64_t total_weight);

Parameters

NameDescription
resultOutput array filled with the fee rate at each percentile.
scoresThe (fee, weight) pairs to compute percentiles from.
total_weightThe total weight across all scores.