HomePhabricator

univalue: Avoid unnecessary roundtrip through double for numbers
7650449a6777Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

univalue: Avoid unnecessary roundtrip through double for numbers

JSON makes no distinction between numbers and reals, and our code
doesn't need to do so either.

This removes VREAL, as well as its specific post-processing in
UniValue::write. Non-monetary amounts do not need to be forcibly
formatted with 8 decimals, so the extra roundtrip was unnecessary
(and potentially loses precision).

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Jul 18 2015, 05:44
deadalnixPushed on May 14 2017, 22:04
Parents
rABCe061e2778d59: rpc: Make ValueFromAmount always return 8 decimals
Branches
Unknown
Tags
Unknown

Event Timeline

Wladimir J. van der Laan <laanwj@gmail.com> committed rABC7650449a6777: univalue: Avoid unnecessary roundtrip through double for numbers (authored by Wladimir J. van der Laan <laanwj@gmail.com>).Jul 18 2015, 07:04