HomePhabricator

rpc: Make ValueFromAmount always return 8 decimals
e061e2778d59Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

rpc: Make ValueFromAmount always return 8 decimals

This is the format that was always returned to JSON clients.
The difference was not noticed before, because VREAL values
are post-processed by univalue.

By implementing the functionality directly it breaks the dependency
of rpcserver on utilmoneystr. FormatMoney is now only used for debugging
purposes.

To test, port over the formatting tests from util_tests.cpp to
rpc_tests.cpp.

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Jul 18 2015, 05:42
deadalnixPushed on May 14 2017, 22:04
Parents
rABCdcc495e011ff: Merge pull request #6372
Branches
Unknown
Tags
Unknown

Event Timeline

Wladimir J. van der Laan <laanwj@gmail.com> committed rABCe061e2778d59: rpc: Make ValueFromAmount always return 8 decimals (authored by Wladimir J. van der Laan <laanwj@gmail.com>).Jul 18 2015, 07:03