HomePhabricator

Don't go through double in AmountFromValue and ValueFromAmount
4b4b9a8de662Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Don't go through double in AmountFromValue and ValueFromAmount

My prime gripe with JSON spirit was that monetary values still had to be
converted from and to floating point which can cause deviations (see #3759
and https://bitcoin.stackexchange.com/questions/22716/bitcoind-sendfrom-round-amount-error).

As UniValue stores internal values as strings, this is no longer
necessary. This avoids risky double-to-integer and integer-to-double
conversions completely, and results in more elegant code to boot.

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Jun 4 2015, 12:22
deadalnixPushed on May 14 2017, 22:04
Parents
rABC12cdbabc26a5: Merge pull request #6152
Branches
Unknown
Tags
Unknown

Event Timeline

Wladimir J. van der Laan <laanwj@gmail.com> committed rABC4b4b9a8de662: Don't go through double in AmountFromValue and ValueFromAmount (authored by Wladimir J. van der Laan <laanwj@gmail.com>).Jun 6 2015, 07:30