Commit Graph

7250 Commits

Author SHA1 Message Date
Simon b85008e786 Update which lock to synchronize on when calling GetBestAnchor(). 2017-09-26 10:16:33 -07:00
Jack Grigg 39cb7df909
make-release.py: Versioning changes for 1.0.12-rc1. 2017-09-23 10:42:23 +01:00
Homu f34c60de37 Auto merge of #2615 - bitcartel:2448_shield_coinbase, r=bitcartel
Add RPC command shield_coinbase #2448.

Shield transparent coinbase funds by sending to a shielded z address. Closes #2448.
2017-09-22 12:04:31 -07:00
Simon 06c19063bb Implement RPC shield_coinbase #2448. 2017-09-21 15:04:12 -07:00
Homu 8f16b27304 Auto merge of #2616 - nathan-at-least:importprivkey-shows-address.4, r=str4d
Importprivkey shows address

Scratching an itch: make `importprivkey` output the corresponding address.

Without this PR, `importprivkey` shows no output. Because we're moving towards an "address-based" RPC interface, rather than "account-based", there's a gap when using `importprivkey` because there's no way to assign it to a specific account, but also no easy way to determine the address. This change fixes that wart.
2017-09-21 14:29:03 -07:00
Homu 60b4a79000 Auto merge of #2620 - bitcartel:2583_watch_only_fspendable, r=str4d
Closes #2583. Exclude watch-only utxos from coin selection.
2017-09-20 04:49:48 -07:00
Simon b17e1b4080 Closes #2583. Exclude watch-only utxos from z_sendmany coin selection. 2017-09-19 19:42:48 -07:00
Homu 6e9964ff70 Auto merge of #2613 - arielgabizon:load-wallet-benchmark, r=str4d
Add load-wallet benchmark

Closes #2518.
2017-09-19 01:52:22 -07:00
Ariel Gabizon 2e8aefdce1 add load-wallet benchmark 2017-09-18 21:54:53 +02:00
Homu 61d9c6745a Auto merge of #2545 - bhjortsberg:fixes-for-gcc-7, r=str4d
Fixes for gcc 7

This fixes a few issues when using a newer compiler (in my case gcc 7.1.1) available in for example Arch Linux.
Solves for example this issue: https://github.com/zcash/zcash/issues/2304

The first thing is an error when checking for boost_system and is solved by disabling that warning (wich is treated as an error and, hence, stops the build):

```
configure:22242: checking for exit in -lboost_system-mt
configure:22267: g++ -m64 -o conftest -std=c++11 -pipe -fPIC -O1 -fwrapv -fno-strict-aliasing -Werror -g  -Wformat -Wformat-security -Wstack-protector -fstack-protector-all -fPIE ..<snip>... /x86_64-unknown-linux-gnu/share/../lib conftest.cpp -lboost_system-mt  -lanl  >&5
conftest.cpp:70:6: error: declaration of 'char exit()' conflicts with built-in declaration 'void exit(int)' [-Werror=builtin-declaration-mismatch]
 char exit ();
      ^~~~
cc1plus: all warnings being treated as errors

```

The second thing was to clean some code that is deprecated in C++11 which also lead to a warning treated as error. It could also be fixed with `-Wno-deprecated` but better to fix the issue in my opinion.
2017-09-18 11:45:24 -07:00
Homu e0bef1de56 Auto merge of #2564 - str4d:2074-currency-units, r=str4d
Rationalize currency unit to "ZEC"

Cherry-picked from the upstream PR bitcoin/bitcoin#6504

Part of #2074
2017-09-18 00:07:52 -07:00
Nathan Wilcox de422c066b [tests pass] Ensure `importprivkey` outputs the address in case key is already imported. 2017-09-18 15:30:42 +09:00
Nathan Wilcox d187317083 [tests pass] Output address on new key import. 2017-09-18 15:30:42 +09:00
Homu d1bba6f1b6 Auto merge of #2601 - str4d:2156-large-wallet-utxos, r=str4d
Benchmark time to call sendtoaddress with many UTXOs

Part of #2156.
2017-09-13 15:38:57 -07:00
Jack Grigg a76174b76b
Benchmark time to call sendtoaddress with many UTXOs 2017-08-31 02:15:06 +01:00
Jason Davies d6252a9473 Fix deprecation policy comment.
Thanks to @daira for spotting this and suggesting the correct policy.
2017-08-15 19:09:12 +01:00
Jack Grigg 2fd43c599f
make-release.py: Versioning changes for 1.0.11. 2017-08-15 09:52:36 +01:00
Jack Grigg 6dec2d0355
Rationalize currency unit to "ZEC" 2017-08-03 18:49:04 +01:00
Ross Nicoll 091b2116a0
Rationalize currency unit to "BTC"
Previously various user-facing strings have used inconsistent currency units "BTC",
"btc" and "bitcoins". This adds a single constant and uses it for each reference to
the currency unit.

Also adds a description of the unit for --maxtxfee, and adds the missing "amount"
field description to the (deprecated) move RPC command.
2017-08-03 16:32:41 +01:00
Ariel Gabizon fcf824e9f1 make-release.py: Versioning changes for 1.0.11-rc1. 2017-08-01 17:11:57 +02:00
Homu 10acd8a1fb Auto merge of #2484 - str4d:block-download-completion, r=daira
Add block download progress to metrics UI
2017-07-28 21:57:19 -07:00
Jack Grigg 92bfde0edf
Improve network height estimation 2017-07-28 10:50:07 +00:00
Jack Grigg 4a651837be
Correct and extend EstimateNetHeightInner tests
Corrections are to the median block times, which were generated by subtracting
CBlockIndex::nMedianTimeSpan / 2 from the block height and then multiplying by
the target spacing. GetMedianTimePast() takes an array sorted by std::sort() and
returns element CBlockIndex::nMedianTimeSpan / 2, meaning that if
CBlockIndex::nMedianTimeSpan is odd (which it is), there is an out-by-one error
in the subtraction.
2017-07-28 10:45:44 +00:00
Homu d6e6f51724 Auto merge of #2526 - bitcartel:2480_segfault_zeroconf_from_zaddr, r=daira
Fixes #2480 where missing map entry would cause a segfault.

`wtxHeight = mapBlockIndex[wtx.hashBlock]->nHeight;` results in undefined behaviour when the block hash is not present in the map, returning a null value which is dereferenced via `->nHeight`.  This error is triggered by a zero-conf wallet transaction which has not been mined yet.  As discussed in #2480, on some systems there is a segfault whilst on others there is a silent exit.  This makes it difficult to write a test, but the fix has been tested empirically to confirm an exception is thrown.  This PR fixes the segfault and complements #2525 which prevents a user from sending from a zaddr with minconf 0.
2017-07-27 22:42:59 -07:00
Jack Grigg 047aec1e0e
Add block download progress to metrics UI 2017-07-26 00:51:12 +00:00
Homu e88ab1a920 Auto merge of #2529 - str4d:2444-rpc-www-authenticate, r=daira
[rpc] Add WWW-Authenticate header to 401 response

Fix cherry-picked from upstream PR bitcoin/bitcoin#7472.

Closes #2444.
2017-07-25 15:36:33 -07:00
Homu a698116b28 Auto merge of #2478 - bitcartel:2477_send_alert_1.0.10, r=daira
Alert for 2017-06-23.a degraded networking (fixed in 1.0.10-1)

Alert 1004 (version 1.0.10 only) Issue #2477
2017-07-25 13:03:53 -07:00
Homu 95d18784ec Auto merge of #2525 - bitcartel:2519_no_zero_minconf_from_zaddr_zsendmany, r=daira
When sending from a zaddr, minconf cannot be zero.

Closes #2519.
2017-07-20 08:24:54 -07:00
Bjorn Hjortsberg ecd04e914f Remove deprecated exception specification
Warns on a newer compiler that these are deprecated in C++11
2017-07-20 13:58:39 +02:00
Homu d2627bc65d Auto merge of #2504 - daira:2501.remove-upnp, r=daira
Remove UPnP support. fixes #2500

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-07-16 03:43:54 -07:00
Simon 9b5da42745 Fixes #2480. Null entry in map was dereferenced leading to a segfault. 2017-07-14 00:10:54 -07:00
Wladimir J. van der Laan 20fb708e6f
rpc: Add WWW-Authenticate header to 401 response
A WWW-Authenticate header must be present in the 401
response to make clients know that they can authenticate,
and how.

    WWW-Authenticate: Basic realm="jsonrpc"

Fixes #7462.
2017-07-12 16:37:48 -05:00
Jack Grigg 689264bbff
Add test for issue #2444
A WWW-Authenticate header must be present in the 401 response to make clients
know that they can authenticate, and how.
2017-07-12 16:34:58 -05:00
Simon b639bb1eef Fixes #2519. When sending from a zaddr, minconf cannot be zero. 2017-07-11 11:29:43 -07:00
Simon d77a0ac4a0 Closes #2446 by adding generated field to listunspent.
If generated is true, the unspent transaction output is from a
coinbase transaction and can only be sent to a shielded address.
2017-07-11 10:44:36 -07:00
Homu 90a255a747 Auto merge of #2464 - str4d:torcontrol-rbf-resource-leak, r=daira
Net: Fix resource leak in ReadBinaryFile(...)

Introduced in 3290567bbd via PR #2177.

Cherry-picked from Bitcoin PR https://github.com/bitcoin/bitcoin/pull/10408
2017-07-10 10:43:22 -07:00
Daira Hopwood 506a21850a Remove UPnP support. fixes #2500
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-07-03 08:57:05 +01:00
Daira Hopwood 262fc5f4e3 Alert 1004 (version 1.0.10 only)
Author: Simon <simon@bitcartel.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-24 19:49:41 +01:00
Simon d444e1cf40 make-release.py: Versioning changes for 1.0.10-1. 2017-06-23 19:43:29 -07:00
Sean Bowe 15a9937654 Revert "Delete old protocol version constants and simplify code that used them."
This reverts commit 5a49c929dd.
2017-06-23 18:19:25 -06:00
Sean Bowe 9ad9a25eff Revert "Remove an unneeded version workaround as per @str4d's review comment."
This reverts commit 1e9db0b38a.
2017-06-23 18:19:17 -06:00
practicalswift 1240717431
Net: Fix resource leak in ReadBinaryFile(...)
Introduced in 3290567bbd via PR #2177.
2017-06-23 18:49:43 +12:00
Jack Grigg dc2ead6021
make-release.py: Versioning changes for 1.0.10. 2017-06-22 14:47:15 +12:00
Homu 59de56eeca Auto merge of #2342 - bitcartel:1081__mempoolpatch, r=str4d
Add ability for node to reject tx from mempool by number of tx inputs

Implement short-term solution described in #2343 so that users can respond promptly to critical short-term problems caused by quadratic validation scaling, such as the getblocktemplate latency, block propagation latency, and mempool size inflation issues described in #2333.
2017-06-21 14:42:13 -07:00
Homu 02e5fffadc Auto merge of #2360 - daira:2359.remove-lax-der-validation, r=arcalinea
Remove unneeded lax ECDSA signature verification

Fixes #2359. Removes code for lax ECDSA verification, and the SCRIPT_VERIFY_DERSIG flag that controlled it. The behaviour is as-if the flag is always set.
2017-06-20 19:05:58 -07:00
Simon d8616d012a Partial revert & fix for commit 9e84b5a ; code block in wrong location. 2017-06-19 21:11:34 -07:00
Jack Grigg 4ef014151d
Additional testing of -mempooltxinputlimit 2017-06-20 15:58:46 +12:00
Kevin Pan 26d27a15ce "getblocktemplate" could work without wallet 2017-06-20 10:41:46 +08:00
Daira Hopwood c2a722d3c4 Fix a comment that was made stale before launch by #1016 (commit 542da61).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-19 16:33:18 +01:00
Daira Hopwood 00fde35b1c Make transaction test failures print the comments preceding the test JSON.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-19 16:33:18 +01:00