Commit Graph

123 Commits

Author SHA1 Message Date
jl777
779d962f33 test 2016-11-15 13:37:51 -03:00
jl777
0a72b10ad5 test 2016-11-15 13:28:43 -03:00
jl777
0ad6a46368 test 2016-11-15 13:18:43 -03:00
jl777
798f28c7d3 test 2016-11-15 12:27:14 -03:00
jl777
ff3fb0f161 test 2016-11-15 11:23:06 -03:00
jl777
ce906ce757 test 2016-11-15 11:17:55 -03:00
jl777
7c29073fa4 test 2016-11-15 10:54:01 -03:00
jl777
0fec0cc4b3 test 2016-11-15 10:38:38 -03:00
jl777
a547ea39b6 test 2016-11-14 15:32:28 -03:00
jl777
073a37a2dc test 2016-11-14 15:10:42 -03:00
jl777
3959e9f32d test 2016-11-12 12:10:15 -03:00
jl777
6caf0e0ac3 test 2016-11-11 20:29:01 -03:00
jl777
f305836943 test 2016-11-11 20:26:05 -03:00
jl777
4a4e912bbe test 2016-11-11 20:15:05 -03:00
jl777
fd8dd3c26d test 2016-11-04 18:11:04 -03:00
jl777
2d4c201cef test 2016-11-04 09:16:44 -03:00
jl777
65195b3ed7 test 2016-10-29 15:17:51 -03:00
jl777
30853e4ab9 Merge remote-tracking branch 'zcash/master' into dPoW 2016-10-28 13:50:21 -03:00
jl777
429dabb503 test 2016-10-27 09:49:42 -03:00
jl777
36a6561207 test 2016-10-26 20:49:16 -03:00
jl777
f38345e99b test 2016-10-26 07:34:50 -03:00
jl777
c3e43fb182 test 2016-10-23 18:52:10 -03:00
jl777
92e15ee337 test 2016-10-22 13:41:32 -03:00
jl777
17878015bb test 2016-10-22 13:23:25 -03:00
jl777
47658758e1 test 2016-10-22 12:27:01 -03:00
jl777
fdbf481faf test 2016-10-22 11:56:19 -03:00
jl777
e42867d124 test 2016-10-22 11:38:25 -03:00
jl777
09c5c3d332 test 2016-10-22 10:31:05 -03:00
jl777
6ef202b24a test 2016-10-22 10:24:06 -03:00
jl777
8ad9f27fdd test 2016-10-21 18:32:52 -03:00
jl777
2897cc41e0 test 2016-10-21 18:28:28 -03:00
jl777
40cb0c7d41 test 2016-10-21 18:15:46 -03:00
jl777
560c5598be test 2016-10-21 18:03:15 -03:00
jl777
8c8552a2ab test 2016-10-21 15:48:46 -03:00
jl777
e19d8b3dee test 2016-10-21 15:20:30 -03:00
Jack Grigg
1b407cba2b Add heights to log output 2016-10-20 11:02:15 -05:00
Jack Grigg
878c4b1b50 Clear witness cache when re-witnessing notes
Closes #1378
2016-10-20 10:32:20 -05:00
jl777
f2dd868d93 test 2016-10-20 06:32:43 -03:00
jl777
482c3933ad test 2016-10-18 13:17:40 -03:00
Jack Grigg
b6961fc112 Increment witnesses for new transactions on rescan
Closes #1400
2016-10-17 09:55:02 -05:00
Daira Hopwood
95e32d88b0 Add another assertion about the witness cache.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-17 05:09:27 +01:00
Daira Hopwood
8e41408aa7 Add another assertion to narrow down where the bug occurs.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-17 05:09:27 +01:00
Daira Hopwood
8a7d37befd Move the increment of nWitnessCacheSize to make the later assertions correct.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-17 05:09:27 +01:00
Jack Grigg
83d7b5b67b Add more asserts to track down the bug 2016-10-17 05:09:27 +01:00
zkbot
ec8dc3a88a Auto merge of #1431 - bitcartel:master_1373_taddr_coinbase_error, r=bitcartel
Return a more informative error message when trying to spend coinbase; select non-coinbase inputs when sending to a transparent output if needed

For #1373 and #1519

Code change:
- Extra parameter added to AvailableCoins to include or exclude Coinbase coins.  Default value of parameter is 'true' as current behaviour is to include Coinbase coins.
- SelectCoins, used for sending taddr->taddr, will now exclude Coinbase coins.

Unit test:
Tried to write a test to focus on the extra parameter added to AvailableCoins but could not.

Empirical testing on Testnet:
Current behaviour is that upstream RPC commands sendfrom and sendtoaddress try to spend coinbase coins returned by AvailableCoins.  So the user will see:

```
./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 1000.0
error: {"code":-6,"message":"Insufficient funds"}

./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
error: {"code":-4,"message":"Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."}

./zcash-cli sendfrom "" mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
error: {"code":-4,"message":"Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."}
```

After fix is applied:

```
./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 1000.0
error: {"code":-6,"message":"Insufficient funds"}

./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
error: {"code":-4,"message":"Coinbase funds can only be sent to a zaddr"}
```

When non-coinbase UTXOs exist, they will now be selected and used:

```
./zcash-cli z_sendmany tnPJZHeVxegCg91utaquBRPEDBGjozfz9iLDHt7zvphFbZdspNgkTVLCGjDcadQBKNyUwKs8pNjDXuEZKrE1aNLpFwHgz4t '[{"address":"mx5fTRhLZwbYE7ZqhAPueZgQGSnwTbdvKU", "amount":0.01}]'

./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 1000.0
error: {"code":-6,"message":"Insufficient funds"}

./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
9818e543ac2f689d4ce8b52087607d73fecd771d45d316a1d9db092f0485aff2

./zcash-cli sendfrom "" mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
899f2894823f51f15fc73b5e0871ac943edbe0ff88e1635f86906087b72caf30
```
2016-10-16 22:08:07 -04:00
Simon
2b1cda3b6a Return improved error message when trying to spend Coinbase coins (#1373).
Extra parameter added to AvailableCoins to include or exclude Coinbase coins.
SelectCoins, used for sending taddr->taddr, will exclude Coinbase coins.

Added qa rpc test and a runtime parameter -regtestprotectcoinbase to enforce
the coinbase->zaddr consensus rule in regtest mode.
2016-10-16 19:05:56 -07:00
Jack Grigg
6e263a5fd3 Address review comments 2016-10-16 16:26:51 -05:00
Jack Grigg
a581fe2aae Only ignore runtime errors caused by failed note decryption 2016-10-14 17:16:09 -05:00
Jack Grigg
1a62587e9a Delay caching of nullifiers when wallet is locked
Closes #1502
2016-10-14 17:16:09 -05:00
zkbot
cc10005247 Auto merge of #1486 - str4d:1456-writewitnesscache-exception-safety, r=bitcartel
WriteWitnessCache: Catch errors and abort transaction

Closes #1452
2016-10-14 17:37:53 -04:00