Fix sha256sum on busybox
Busybox's version of `sha256sum` doesn't support `--check` parameter
```
/usr/bin/sha256sum: unrecognized option: check
BusyBox v1.24.2 (2016-08-12 14:38:34 GMT) multi-call binary.
Usage: sha256sum [-c[sw]] [FILE]...
Print or check SHA256 checksums
-c Check sums against list in FILEs
-s Don't output anything, status code shows success
-w Warn about improperly formatted checksum lines
The command '/bin/sh -c ./zcutil/fetch-params.sh' returned a non-zero code: 1```
Address @str4d's comment on #1965 about the case where -gen is not set
https://github.com/zcash/zcash/pull/1965#discussion_r100414069
Note that the case of calling the ``setgenerate true`` RPC with the wallet disabled was already handled correctly.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
Convert entire source tree from json_spirit to UniValue
This PR cherry-picks bitcoin/bitcoin#6121 and then migrates the Zcash-specific code to UniValue.
Also cherry-picks:
- bitcoin/bitcoin#6241
- bitcoin/bitcoin#6234
Closes#1985.
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).
Zcash: cherry-picked from commit 7650449a6777710cf818d41862626164da0cd412
Dropped changes to qa/rpc-tests/rest.py pending addition of /rest/headers/
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.
Add a function `ParseFixedPoint` that parses numbers according
to the JSON number specification and returns a 64-bit integer.
Then this in `AmountFromValue`, rather than `ParseMoney`.
Also add lots of tests (thanks to @jonasschnelli for some of them).
Fixes issue #6297.