Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bitcoin#23037: test: fix confusing off-by-one nValue in feature…
…_coinstatsindex.py ebe49b5 test: fix confusing off-by-one nValue in feature_coinstatsindex.py (Sebastian Falbesoner) Pull request description: Due to evil floating-point arithmetic, the creation of one of the transaction outputs in feature_coinstatsindex.py leads to it's nValue being off by one satoshi: the Python expression `int(21.99 * COIN)` doesn't yield 2199000000 as expected, but 2198999999. This makes the test more confusing than necessary (w.r.t. the expected `gettxoutsetinfo` values), and could also cause problems if the value is ever changed. Fix by using a `Decimal` type for specifying the value in BTC, rather than using a bare floating-point. ACKs for top commit: MarcoFalke: cr ACK ebe49b5 Tree-SHA512: c74c51dbf99818f3d1c881873e0c053a649e4fed9b36767ff971dd3a48bff7122afea4e07cc9925236570368b45579f63e443701f2aaef838a0fafdbe986dfd4
- Loading branch information