Commit Graph

249 Commits

Author SHA1 Message Date
jl777
4aa2c64e7b test 2016-10-25 10:51:04 -03:00
jl777
353edf5d61 test 2016-10-25 10:18:32 -03:00
jl777
9415da7f1f test 2016-10-25 10:16:45 -03:00
jl777
b62d7030ef prepare for assetchains 2016-10-25 10:11:37 -03:00
jl777
beafd76b02 test 2016-10-25 08:23:55 -03:00
jl777
cbee4d6b16 test 2016-10-24 18:09:36 -03:00
jl777
303f5c1bf1 test 2016-10-24 17:58:09 -03:00
jl777
b68920a15b test 2016-10-24 17:26:09 -03:00
jl777
3ba8f9236e test 2016-10-24 17:20:51 -03:00
jl777
35199465da test 2016-10-24 15:22:25 -03:00
jl777
e137bdc49e test 2016-10-24 15:13:09 -03:00
jl777
f5244b3644 test 2016-10-24 15:08:39 -03:00
jl777
81fbe1ed05 test 2016-10-24 15:07:49 -03:00
jl777
6e9dec7836 test 2016-10-24 15:04:07 -03:00
jl777
d7d27bb347 test 2016-10-24 15:00:01 -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
7652ed92bd test 2016-10-22 13:35:17 -03:00
jl777
17878015bb test 2016-10-22 13:23:25 -03:00
jl777
2860f74793 test 2016-10-22 13:03:18 -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
24eefea8e0 test 2016-10-22 11:41:49 -03:00
jl777
e42867d124 test 2016-10-22 11:38:25 -03:00
jl777
cad0d1ca62 test 2016-10-22 11:32:24 -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
ce8b023c7a test 2016-10-21 18:14:17 -03:00
jl777
560c5598be test 2016-10-21 18:03:15 -03:00
jl777
0f24f24562 test 2016-10-21 17:28:28 -03:00
jl777
8c8552a2ab test 2016-10-21 15:48:46 -03:00
jl777
e19d8b3dee test 2016-10-21 15:20:30 -03: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
ddea44a27e Update comments 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
Jack Grigg
fb2653ed0e Add unit test that fails when calling FindMyNotes on a locked wallet 2016-10-14 17:14:13 -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