Commit Graph

10257 Commits

Author SHA1 Message Date
Simon f47269cda9 Add assert to check alert message length is valid 2017-02-17 11:55:41 -08:00
Jay Graber cc64e2ccc8 Add rpc test for prioritisetransaction 2017-02-12 11:01:45 -08:00
Leo Arias 82c754f628 Fix the path to the example configuration 2017-02-11 13:52:15 -06:00
zkbot be5ac31607 Auto merge of #2087 - bitcartel:1.0.6_release_process_add_missing_file, r=bitcartel
1.0.6 release process

Add release notes generated by script (accidentally excluded from last PR).
2017-02-11 00:07:56 +00:00
Simon 312863fbee Add release notes generated by script as part of release process 2017-02-10 16:02:16 -08:00
zkbot ac8e575205 Auto merge of #2085 - bitcartel:1.0.6_release_process, r=bitcartel
1.0.6 release process
2017-02-10 22:52:47 +00:00
Simon 8da1ab7792 Fix debian manpage manually as part of release process 2017-02-10 14:12:10 -08:00
Simon 5b9eb25e67 Fix manpage as part of release process. 2017-02-10 12:54:09 -08:00
Simon 804523da8e Update authors.md using fixed release-notes.py, as part of release process. 2017-02-10 12:51:08 -08:00
Simon a8d201026e Fix bug in release process tool: bad regex in zcutil/release-notes.py. 2017-02-10 12:50:01 -08:00
Simon 027ab14b29 Update debian changelog as part of release process 2017-02-10 10:29:10 -08:00
Simon f3211ddd48 Update release notes as part of release process 2017-02-10 10:22:19 -08:00
Simon 31a4f0d5c9 Debian man pages updated as part of release process 2017-02-10 10:20:21 -08:00
Simon 2ddec8f0e4 Bump version to 1.0.6 as part of release process 2017-02-10 09:55:49 -08:00
zkbot 93baaeee3e Auto merge of #2081 - daira:1955-single-address-mining, r=bitcartel
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>
2017-02-10 08:58:19 +00:00
zkbot eaaa5f625f Auto merge of #2082 - str4d:univalue-subtree, r=bitcartel
Add UniValue as subtree

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6637
- bitcoin/bitcoin#6239
- bitcoin/bitcoin#6379
- bitcoin/bitcoin#6456
- bitcoin/bitcoin#6788
2017-02-10 07:46:58 +00:00
Simon 238fec642d Update test to check for updated error messages in AmountFromValue(). 2017-02-09 23:32:15 -08:00
zkbot e51bd1b556 Auto merge of #1990 - str4d:1985-replace-json-spirit-with-univalue, r=str4d
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.
2017-02-10 05:15:53 +00:00
zkbot 44788f9990 Auto merge of #2080 - ebfull:libsnark-update, r=bitcartel
Update libsnark.

This updates libsnark to adopt https://github.com/zcash/libsnark/pull/11. Do not merge this until https://github.com/zcash/libsnark/pull/11 is merged.

Closes #2043
2017-02-10 03:51:13 +00:00
Jack Grigg f54db399f2
Get rid of fPlus argument to FormatMoney in Zcash-specific code 2017-02-10 02:19:14 +00:00
Jack Grigg c24109ecc3
UniValue::getValues const reference 2017-02-10 02:19:12 +00:00
Jack Grigg 2cc6bab201
Update UniValue includes in Zcash-specific code 2017-02-10 02:19:06 +00:00
Cory Fields 1dc626314d
build: match upstream build change 2017-02-10 02:19:03 +00:00
Wladimir J. van der Laan a8c22cc4d1
util: use locale-independent parsing in ParseDouble
Use locale-indepent C++ based parsing instead of C's strtod,
which checks for different input based on the user's locale.
Fixes #6443.
2017-02-10 02:19:02 +00:00
Wladimir J. van der Laan 2aee461930
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).

Zcash: cherry-picked from commit 7650449a6777710cf818d41862626164da0cd412
Dropped changes to qa/rpc-tests/rest.py pending addition of /rest/headers/
2017-02-10 02:19:01 +00:00
Wladimir J. van der Laan d5bf1afae9
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.
2017-02-10 02:18:59 +00:00
Wladimir J. van der Laan fed500e2dd
rpc: Accept scientific notation for monetary amounts in JSON
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.
2017-02-10 02:18:58 +00:00
Wladimir J. van der Laan e76a3849c6
Changes necessary now that zero values accepted in AmountFromValue
- Add an accept test for zero amounts, and a reject test for negative
  amounts
- Remove ugly hack in `settxfee` that is no longer necessary
- Do explicit zero checks in wallet RPC functions
- Don't add a check for zero amounts in `createrawtransaction` - this
  could be seen as a feature
2017-02-10 02:18:57 +00:00
Wladimir J. van der Laan a5beb3a51b
Get rid of fPlus argument to FormatMoney
It's never used with any other value than false, the default.
2017-02-10 02:18:55 +00:00
Wladimir J. van der Laan c66dff3dc7
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.
2017-02-10 02:18:54 +00:00
Jonas Schnelli fbc98d7720
remove $(@F) and subdirs from univalue make 2017-02-10 02:18:52 +00:00
Jonas Schnelli a10a6e2a0e
[Univalue] add univalue over subtree
similar to secp256k1 include and compile univalue over a subtree
2017-02-10 02:18:51 +00:00
Jack Grigg 0025fb4b0e
Merge commit 'a4071034f6ad640ef91057fa3f45098c4933f444' as 'src/univalue' 2017-02-10 02:18:46 +00:00
Jack Grigg a4071034f6
Squashed 'src/univalue/' content from commit 9ef5b78
git-subtree-dir: src/univalue
git-subtree-split: 9ef5b78c1998509b8f1ccd76f0aee15140e384be
2017-02-10 02:18:44 +00:00
Jonas Schnelli 7fc7bab25d
remove univalue, prepare for subtree 2017-02-10 00:56:22 +00:00
Jack Grigg 02972a1bcd
[cleanup] Simplify test code 2017-02-10 00:53:15 +00:00
Jack Grigg 873c40365a
[cleanup] Remove unused import 2017-02-10 00:53:14 +00:00
Jack Grigg cc71666a51
unsigned int -> size_t for comparing with UniValue.size() 2017-02-10 00:53:13 +00:00
Jack Grigg 0821ddb0de
Remove JSON Spirit from contrib/debian/copyright 2017-02-10 00:53:11 +00:00
Jack Grigg 5fb326d41d
Manually iterate over UniValue arrays in tests 2017-02-10 00:53:09 +00:00
Jack Grigg 0d37ae3a59
Migrate Zcash-specific code to UniValue 2017-02-10 00:52:57 +00:00
Jonas Schnelli f70084cf06
fix rpcmining/getblocktemplate univalue transition logic error 2017-02-10 00:35:24 +00:00
Jonas Schnelli b60e9f230f
fix util_tests.cpp clang warnings
was introduced with #6121
2017-02-10 00:35:24 +00:00
Jonas Schnelli 6b1e42bbfa
univalue: add type check unit tests 2017-02-10 00:35:24 +00:00
Wladimir J. van der Laan 4bcb9c9099
univalue: add strict type checking 2017-02-10 00:35:24 +00:00
Wladimir J. van der Laan 5960d70002
util: Add ParseInt64 and ParseDouble functions
Strict parsing functions for other numeric types.

- ParseInt64 analogous to ParseInt32, but for 64-bit values.
- ParseDouble for doubles.
- Make all three Parse* functions more strict (e.g. reject whitespace on
  the inside)

Also add tests.
2017-02-10 00:35:24 +00:00
Wladimir J. van der Laan ff67da37cd
Simplify RPCclient, adapt json_parse_error test
# Conflicts:
#	src/test/rpc_tests.cpp
2017-02-10 00:35:24 +00:00
Jonas Schnelli c288192b19
fix univalue json parse tests 2017-02-10 00:35:24 +00:00
Jonas Schnelli b47f3aea36
fix missing univalue types during constructing 2017-02-10 00:35:24 +00:00
Jonas Schnelli bf3f56025d
fix rpc batching univalue issue 2017-02-10 00:35:24 +00:00