Pieter Wuille
a2bc330da8
feefrac test: avoid integer overflow (bugfix)
2025-04-08 15:18:03 -04:00
Pieter Wuille
58914ab459
fuzz: assert min diff between FeeFrac and CFeeRate
...
Co-Authored-By: Greg Sanders <gsanders87@gmail.com>
2025-04-07 10:51:41 -04:00
Pieter Wuille
0c6bcfd8f7
feefrac: support both rounding up and down for Evaluate
...
Co-Authored-By: l0rinc <pap.lorinc@gmail.com>
2025-04-07 10:51:41 -04:00
Pieter Wuille
ecf956ec9d
feefrac: add support for evaluating at given size
2025-04-07 10:51:41 -04:00
Pieter Wuille
7963aecead
feefrac: add helper functions for 96-bit division
...
These functions are needed to implement FeeFrac evaluation later: given a
FeeFrac{fee, size}, its fee at at_size is (fee * at_size / size).
2025-04-07 10:50:56 -04:00
Pieter Wuille
fcfe008db2
feefrac fuzz: use arith_uint256 instead of ad-hoc multiply
...
Rather than use an ad-hoc reimplementation of wide multiplication inside the
fuzz test, reuse arith_uint256, which already has this. It's larger than what we
need here, but performance isn't a concern in this test, and it does what we need.
2025-04-07 10:45:13 -04:00
Greg Sanders
7e89b659e1
Add fuzz test for FeeFrac
2024-03-18 10:32:00 -04:00