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
cc71666a51
unsigned int -> size_t for comparing with UniValue.size()
2017-02-10 00:53:13 +00:00
Jack Grigg
0d37ae3a59
Migrate Zcash-specific code to UniValue
2017-02-10 00:52:57 +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
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
d014114d67
Remove JSON Spirit wrapper, remove JSON Spirit leftovers
...
- implement find_value() function for UniValue
- replace all Array/Value/Object types with UniValues, remove JSON Spirit to UniValue wrapper
- remove JSON Spirit sources
2017-02-10 00:35:24 +00:00
Jonas Schnelli
851f58f94e
remove JSON Spirit UniValue wrapper
2017-02-10 00:35:24 +00:00
Jonas Schnelli
565d26737a
fix rpc unit test, plain numbers are not JSON compatible object
...
UniValues read() does only read valid json.
2017-02-10 00:35:24 +00:00
Jonas Schnelli
49a5df0ef3
univalue: add support for real, fix percision and make it json_spirit compatible
...
- avoid breaking the API because of different number/percision handling
2017-02-10 00:35:24 +00:00
Jonas Schnelli
38fc4b7090
expicit set UniValue type to avoid empty values
2017-02-10 00:35:24 +00:00
Jonas Schnelli
9756b7bd29
extend conversion to UniValue
2017-02-10 00:35:24 +00:00
Jeff Garzik
ed21d5bd4b
Convert tree to using univalue. Eliminate all json_spirit uses.
2017-02-10 00:35:24 +00:00
Jeff Garzik
ec57cc0ffe
UniValue: prefer .size() to .count(), to harmonize w/ existing tree
2017-02-10 00:35:24 +00:00
Jack Grigg
2cc0a252ad
Add compile flag to disable compilation of mining code
2017-01-30 21:14:46 +01:00
Simon
9064d73bf8
Fixes #1497 ZCA-009 by restricting data exporting to user defined folder.
...
Previously the RPC interface allowed z_exportwallet, backupwallet and
dumpwallet to write data to an arbitrary filename. ZCA-009 demonstrates
how this is vulnerable. The resolution is to only allow data to
written when the -exportdir has been configured. Also filenames are
restricted to alphanumeric characters.
2017-01-16 10:56:06 -08:00
Jack Grigg
6fb8d0c2d6
Skip JoinSplit verification before the last checkpoint
...
Part of #1749
2016-12-09 21:06:45 +13:00
zkbot
a398121503
Auto merge of #1919 - ebfull:abstract-verification, r=str4d
...
Isolate verification to a ProofVerifier context object that allows verification behavior to be tuned by the caller.
This is an alternative foundation for #1892 , i.e., #1892 will have to be changed if this PR is accepted.
I think this is a safer approach because it allows us to isolate verification behavior to a single object. This will come in handy when @arielgabizon finishes the batching code.
2016-12-09 06:22:53 +00:00
zkbot
cdbd851417
Auto merge of #1928 - ebfull:fix-anchor-cache-bug, r=str4d
...
Fix anchor cache bug
Fixes #1912 .
If an anchor is removed from the cache, but didn't exist in it beforehand, it will insert a blank tree. If it's reinserted in a child cache, when the child cache flushes it will mark the treestate as entered but won't bring the valid tree with it.
Thankfully, we assert when connecting blocks so that this inconsistency won't cause us to build on a blank tree after a reorg.
2016-12-08 21:22:23 +00:00
Sean Bowe
08de001a25
Regression test.
2016-12-06 12:54:53 -07:00
Sean Bowe
bc59f53722
Isolate verification to a ProofVerifier context object that allows verification behavior to be tuned by the caller.
2016-12-05 12:40:06 -07:00
Simon
af53da0225
Closes #1903 . Add fee parameter to z_sendmany.
2016-11-30 14:23:35 -08:00
Sean Bowe
f398a94766
Anchors and nullifiers should always be inherited from the parent cache.
2016-11-17 11:43:54 -07:00
Sean Bowe
d92bea9888
Add tests for witness element and tree last methods. Strengthen testing by inserting a different commitment into the tree at each step.
2016-11-14 10:13:06 -07:00
Simon
4e16a7249c
Closes #1746 . Add rpc call z_validateaddress to validate zaddrs.
2016-10-31 20:05:48 -07:00
Jack Grigg
657bde55ef
Update tests for new genesis blocks
...
Miner tests have been commented out, and will be regenerated after launch.
2016-10-28 02:56:15 -07:00
Jack Grigg
ab32254909
Update tests for new genesis blocks
2016-10-27 02:45:21 -07:00
Jack Grigg
2f5d62fe32
Remove Founders' Reward override from #1398
2016-10-26 21:05:17 -07:00
zkbot
30d3d2dfd4
Auto merge of #1603 - str4d:1556-reject-old-block-versions, r=daira
...
Reject block versions lower than 4
Includes parts of #1554
Closes #1556
2016-10-22 14:32:40 -04:00
Jack Grigg
f4f1b4b097
Update sighash tests for new consensus rule
2016-10-22 11:09:07 -05:00
Daira Hopwood
789914e7b0
Update comments in chainparams.cpp.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org >
2016-10-22 13:46:22 +01:00
Jack Grigg
86d2c90468
Update tests for new genesis blocks
2016-10-22 00:52:58 -05:00
Jack Grigg
8c54e34a68
Use tromp's solver to regenerate miner tests
...
When using, comment out tromp's solver in miner.cpp to avoid linker errors.
2016-10-22 00:52:56 -05:00
zkbot
7ccbcca62c
Auto merge of #1591 - bitcartel:upstream_7933_fix_out_of_memory_deserializing_utxo, r=daira
...
Upstream: fix out of memory problem when deserializing utxo
bitcoin/bitcoin#7933
2016-10-21 23:32:51 -04:00
zkbot
10ad093bbb
Auto merge of #1567 - str4d:rename-binaries, r=daira
...
Rename binaries
This ensures that our installs don't clash with existing Bitcoin binaries and libraries.
Closes #1563 and #1565
2016-10-21 20:48:11 -04:00
Simon
43f0769cf6
Fix build problem with coins_tests
2016-10-20 23:50:19 -07:00
Pieter Wuille
abd22bb674
Add tests for CCoins deserialization
2016-10-20 22:59:50 -07:00
zkbot
c99a1c7e4f
Auto merge of #1566 - daira:1557.make-v2-txns-standard, r=ageis
...
1557.make v2 txns standard
Make v2 transactions standard. This also corrects a rule about admitting large orphan transactions into the mempool, to account for v2-specific fields. ref #1557
2016-10-21 01:10:37 -04:00
zkbot
f90526579b
Auto merge of #1569 - str4d:1552-disable-wallet-encryption, r=daira
...
Disable wallet encryption
Closes #1552
2016-10-20 17:01:51 -04:00
Jack Grigg
d8e06e3f58
Add test that encryptwallet is disabled
2016-10-20 14:45:44 -05:00
Jack Grigg
66a89c08df
Rename bitcoin-tx to zcash-tx
...
Closes #1565
2016-10-18 16:45:43 -05:00
Jack Grigg
08d6b02d5e
Rename libbitcoinconsensus to libzcashconsensus
...
Closes #1563
2016-10-18 16:45:37 -05:00
Daira Hopwood
71cc1b58a1
Add tests for IsStandardTx applied to v2 transactions.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org >
2016-10-18 19:37:55 +01:00
Jack Grigg
3774c944f8
Refactor test code to better test JSDescription::Randomized()
2016-10-18 12:44:56 -05:00
Jack Grigg
7f0aa74666
Implement static method for creating a randomized JSDescription
2016-10-18 10:41:00 -05:00
zkbot
3fceaca3a1
Auto merge of #1506 - bitcartel:master_1478_fix_testnet3_test_issue, r=bitcartel
...
Stop some wallet tests creating ~/.zcash/testnet3 folder by setting -datadir environment
Closes #1478
2016-10-14 17:03:11 -04:00
Simon
6be367ea6d
Fix test so that the encrypted wallet is output to the test_bitcoin -datadir folder.
2016-10-14 12:44:22 -07:00
zkbot
8eb672251b
Auto merge of #1513 - bitcartel:master_1491_fix_help_message_rpc_z_importkey, r=daira
...
Fixes #1491 by updating help message for rpc call z_importkey
2016-10-13 19:05:08 -04:00