I’ve seen the vectors above vFeerateHistogram, are also simple vector types containing integers, unsigned chars, or CAmounts.
However, we do not name these vectors vCAmounts, vInts, or vUnsignedChars. Instead, they are named based on some context, such as vTxFees, vTxSigOpsCost, and vchCoinbaseCommitment.
For this reason, I believe naming this vector vFeeFrac does not add much clarity because thats obvious.
Instead, I consider vFeerateHistogram to be the closest meaningful name, based on the context of #21422.
Consider this block template vector of package of fee rates: [20/5, 20/5, 20/5, 20/6, 20/6, 15/6].
after sorting by increasing feerate this implicitly represent a histogram-like structure:
- The x-axis could represent distinct fee rate packages.
- The y-axis could represent their frequencies.
Same as with @glozow comment in #30391 (review).
This vector is also implicitly a fee rate diagram. As we can use it to construct a feerate diagram after sorting by increasing feerate.
- The points in the x axis would be the accumulated size of the packages from i to n.
- The points in the y axis would be the fees of each package from i to n.
@rkrux If a more explicit name is desired,
vPackagesFeerates would be the most accurate IMO.
We can continue the discussion , but since this PR already has two A CKs I was hesitating to update, I will proceed to update the variable name and add a comment if a rebase or blocking suggestion arises.
Let me know if this a blocking comment, I am happy to update.