The FeeFrac type represents a fraction, intended to be used for sats/vbyte or sats/WU. It was added to improve accuracy when evaluating fee rates in cluster mempool. [1]
But it can also be used to fix the precision issues that the current CFeeRate class has now.
At the moment, CFeeRate handles the fee rate as satoshis per kilovirtualbyte: CAmount / kvB using an integer.
This PR fix CFeeRate precision issues by encapsulating FeeFrac internally keeping backwards compatibility.
This is a partial backport of core#31363 and core#32750
https://github.com/bitcoin/bitcoin/pull/31363/changes/6eab3b2d7380b8ff818e3a1cefeb7731b7342e04
Bypasses core#31636 (changed size_t to uint32_t for transaction size type)