Commit Graph

583 Commits

Author SHA1 Message Date
Eirik Ogilvie-Wigley 19697025c6 Add test for signing raw transactions offline 2018-09-17 10:27:37 -06:00
Jack Grigg b7f9a7ae02
wallet: Comment out HDSeed and CHDChain persistence to disk
Sapling keys generated from the seed are not yet persisted, so we don't
want to persist the seed or chain state either, otherwise the wallet
could end up in an inconsistent state.

Some tests are temporarily disabled because commenting out HDSeed
persistence breaks invariants inside CCryptoKeyStore.

Revert this commit during the PR for #3388.
2018-09-03 10:45:37 +01:00
Jack Grigg af04224522
Fix file permissions of wallet_sapling RPC test 2018-09-03 08:27:33 +01:00
Jack Grigg 0f436a0a26
Fix RPC test that checks exact wording of cleaned-up error message 2018-09-03 08:23:09 +01:00
Jack Grigg e54c4d2ca1
rpcwallet: Add Sapling support to z_sendmany 2018-08-27 11:36:14 +01:00
Homu 622751da12 Auto merge of #3444 - LarryRuane:2982-mininode-version, r=str4d
generalize mininode.py protocol versioning

Fixes #2982 -- replace `overwintered` boolean argument to NodeConn constructor with a protocol version integer, so that adding Sapling (and beyond) will be easier.
2018-08-20 09:48:51 -07:00
Eirik Ogilvie-Wigley 4e1e91512d Fix assertion and comment 2018-08-06 09:58:40 -06:00
Eirik Ogilvie-Wigley 7929851626 Only include the change field if we have a spending key 2018-08-06 09:58:40 -06:00
Larry Ruane c0aa34a4b2 generalize mininode.py protocol versioning 2018-08-02 20:30:20 -06:00
Homu 066cc9c6c7 Auto merge of #3429 - str4d:3217-sapling-address-creation, r=str4d
Add Sapling support to z_getnewaddress and z_listaddresses

Closes #3217.
2018-08-01 12:01:39 -07:00
Jack Grigg 4aabeebc1f
test: Fix permissions of wallet_addresses 2018-08-01 19:56:01 +01:00
Jack Grigg d75e69da5a
test: Deduplicate logic in wallet_addresses RPC test 2018-08-01 09:44:31 +01:00
Simon f01c11bd0f Add tests for expiryheight parameter of RPC createrawtransaction. 2018-07-30 10:24:10 -07:00
Jack Grigg eec85c4388
Add Sapling support to z_getnewaddress and z_listaddresses 2018-07-30 16:24:20 +01:00
Larry Ruane cb3a815b29 Add call to sync_all() after (z_sendmany, wait) 2018-07-20 12:00:41 -06:00
Daniel Cousens 4b184205e3
rpc: update inline comments to refer to new file paths 2018-07-18 11:07:17 -06:00
Homu b9bd5ab42c Auto merge of #3354 - leto:absurd_fee_bug, r=bitcartel
Fix absurd fee bug reported in #3281, with tests

This was ported from the Hush `absurd_fee_bug` PR: https://github.com/MyHush/hush/pull/136

Tests executed with `./qa/pull-tester/rpc-tests.sh wallet` and pass on Ubuntu 16.04. Some tests were added for previously untested behavior as well.

Closes #3281.
2018-07-17 15:03:08 -07:00
Simon 0b6eeac330 Update and fix per review comments, the test for absurd fee. 2018-07-17 13:00:42 -07:00
Homu 13b41a6760 Auto merge of #3156 - Eirik0:2935-change-indicator, r=bitcartel
Add change indicator

This adds to the json returned when calling z_listreceivedbyaddress and z_listuspent an additional field entitiled 'change' which will be either true or false depending on whether or not the note was change from another transaction.
2018-07-17 11:41:03 -07:00
Eirik Ogilvie-Wigley 62d707d1fd Fix test broken by change indicator 2018-07-16 14:50:06 -06:00
Eirik Ogilvie-Wigley 0646f749f9 Add change indicator for notes 2018-07-16 14:49:29 -06:00
Homu f649bb36c5 Auto merge of #3303 - LarryRuane:2807-rpc-test-round-fees, r=bitcartel
(rpc-test) accurately account for fee without rounding error

Fix for #2807, this test compares balances after doing key exports and imports, and expects these balances to be equal. But they are not exactly equal due to transaction fees, so the test makes them "equal" by rounding a value that has had fees taken out up to the nearest hundredth of a unit (which is much more than the default fee). This obviously is somewhat sloppy. It also converts a balance to float, which really should never be used due to loss of precision (use Decimal instead).

This change makes the test accurately account for the fee using precise comparisons, and removes the use of float. This test doesn't depend on the default fee (0.0001) but instead sets the fee (to that value). This way, if the default fee changes in the future, this test will continue to run. While testing these changes, I set the fee to various values (up to the max, 0.0190), and the test still passes.
2018-06-22 14:01:48 -07:00
Simon a4ff089b2a Fix pyflakes error in test zkey_import_export. 2018-06-22 11:34:21 -07:00
Duke Leto e5aa9f617b Fix absurd fee bug reported in #3281, with tests 2018-06-22 05:20:45 +00:00
Homu 4e3ff06507 Auto merge of #3320 - str4d:macos-tests, r=bitcartel
Fix MacOS tests

Includes code cherry-picked from upstream PR bitcoin/bitcoin#8270.
2018-06-18 19:00:56 -07:00
Jack Grigg 341a22ad90
Skip ELF-only sec-hard checks on non-ELF binaries 2018-06-07 18:49:15 +12:00
Jack Grigg c7e64754dc
Add MacOS support to no-dot-so test 2018-06-05 22:32:13 +12:00
Eirik Ogilvie-Wigley 25c13ef702 Add hashFinalSaplingRoot to getblocktemplate 2018-06-01 15:47:30 -06:00
Larry Ruane fff031688e (rpc-test) accurately account for fee without rounding error 2018-05-24 11:29:14 -04:00
Homu 386a9b35c0 Auto merge of #3238 - str4d:3199-mempool-sapling-activation, r=str4d
Update mempool_nu_activation RPC test to exercise both Overwinter and Sapling

Closes #3199.
2018-05-16 13:52:40 -07:00
Eirik Ogilvie-Wigley a81b36d267 Add more options when asserting in RPC tests 2018-05-04 09:38:36 -06:00
Jack Grigg 11aa594440
Remove obsolete CreateJoinSplit and GenerateParams binaries 2018-05-03 13:18:03 +01:00
Jack Grigg 2c34c1cbff
Update mempool_nu_activation RPC test to exercise both Overwinter and Sapling
Closes #3199.
2018-05-03 01:07:41 +01:00
Simon 9bd8f092c6 Closes #3178 by adding verbosity level improvements to getblock RPC.
This is a follow-up commit for d0a1d833520d120bb5a2ac4cf4192047af6afe24
found in PR #3095 in order to fix nits and add a test.
2018-04-30 11:51:59 -07:00
Homu 68cf6f3c2d Auto merge of #3074 - arcalinea:2983_tx_expiry_test_dependent, r=str4d
Add test for dependent txs to mempool_tx_expiry.py

Closes #2983

Also replaced absolute blockheight check with a relative height check.
2018-04-23 15:50:16 -07:00
Jay Graber 7dc0f84788 Add test for dependent txs to mempool_tx_expiry.py 2018-04-18 06:34:09 -07:00
mruddy 690d38f0f8
Resolve issue bitcoin/bitcoin#3166.
These changes decode valid SIGHASH types on signatures in assembly (asm) representations of scriptSig scripts.
This squashed commit incorporates substantial helpful feedback from jtimon, laanwj, and sipa.
2018-04-16 07:38:36 -06:00
Jonas Schnelli 216e94fb24
[RPC] createrawtransaction: add option to set the sequence number per input 2018-04-12 18:10:04 -06:00
Jack Grigg 3fe2f3d143
Update -enforcenodebloom RPC test with filterclear vs filteradd 2018-04-05 01:30:38 +01:00
Jack Grigg b77e46fe01
Add RPC test for -enforcenodebloom 2018-04-05 01:30:38 +01:00
Jack Grigg 10e97b8f00
test: Add missing Overwinter fields to mininode's CTransaction 2018-04-04 22:49:49 +01:00
Daira Hopwood 473a113241 Don't increase banscore if the transaction only just expired.
Author: Jack Grigg <str4d@z.cash>
2018-04-04 01:29:47 +01:00
Daira Hopwood a0ea82301a Test that receiving an expired transaction does not increase the peer's ban score. 2018-04-04 00:01:49 +01:00
Daira Hopwood 697140ede5 Add support for Overwinter v3 transactions to mininode framework. 2018-04-04 00:01:23 +01:00
Jack Grigg 26cdb83add
Update blockchain.py RPC test for Zcash 2018-04-03 20:40:54 +01:00
Pieter Wuille f95bf4c417
Fix chainstate serialized_size computation 2018-04-03 20:40:54 +01:00
James O'Beirne 79272bfaf9
Add tests for gettxoutsetinfo, CLevelDBBatch, CLevelDBIterator
Thanks @dexX7.
2018-04-03 20:40:54 +01:00
Homu 3055fd5508 Auto merge of #3136 - str4d:2937-z_importviewingkey-startheight, r=daira
Fix z_importviewingkey startHeight parameter

Closes #2937.

Co-authored-by: Tomas M <tomas@slax.org>
2018-04-03 09:41:09 -07:00
Homu 3a47b9bcfd Auto merge of #3132 - str4d:2898-rewind-block-index, r=daira
When rewinding, remove insufficiently-validated blocks

If a block is insufficiently-validated against a particular branch ID, then we
cannot guarantee that even the block header will be valid under the actual
consensus rules the node will want to apply. Instead require that the blocks are
completely re-validated, by removing them from the block index (which is
equivalent to reducing their validity to BLOCK_VALID_UNKNOWN).

Closes #3100.
2018-04-03 04:37:21 -07:00
Jack Grigg fe87fd2b36
Add RPC test of RewindBlockIndex 2018-04-03 10:58:27 +01:00