diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-10-22 10:13:35 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-10-22 10:13:44 +0200 |
commit | 1cb4e339f978bfbde7e0159879fe06913bdeae20 (patch) | |
tree | 4097b9cd7f0cd1255cf9d0450af0c5440093dffc /src/rest.cpp | |
parent | dda18e7310a202a8aa46c95279446131659f91c5 (diff) | |
parent | 5aadd4be1883386a04bef6a04e9a1142601ef7a7 (diff) |
Merge #20039: test: Convert amounts from float to decimal
5aadd4be1883386a04bef6a04e9a1142601ef7a7 Convert amounts from float to decimal (Prayank)
Pull request description:
> decimal is preferred in accounting applications
https://docs.python.org/3.8/library/decimal.html
Decimal type saves an exact value so better than using float.
~~3 variables declared with type as 'Decimal' in [test/functional/mempool_accept.py](https://github.com/bitcoin/bitcoin/blob/master/test/functional/mempool_accept.py): fee, fee_expected, output_amount~~
~~Not required to convert to string anymore for using the above variables as decimal~~
+ fee, fee_expected, output_amount
~~+ 8 decimal places~~
+ Using value of coin['amount'] as decimal and removed 'int'
+ Removed unnecessary parentheses
+ Remove str() and use quotes
Fixes https://github.com/bitcoin/bitcoin/issues/20011
ACKs for top commit:
guggero:
ACK 5aadd4be1883386a04bef6a04e9a1142601ef7a7
Tree-SHA512: 5877cf3837e5b65bec0fc8909de141a720bfa02a747513e21d20f3c41ec0cfecc524d2c347a96596b0a1a97900da2acf08b799f26b11d537e4dcddc6ce45f38e
Diffstat (limited to 'src/rest.cpp')
0 files changed, 0 insertions, 0 deletions