Commit Graph

15761 Commits

Author SHA1 Message Date
Wladimir J. van der Laan 7a11ba7e01
Merge #11945: Improve BSD compatibility of contrib/install_db4.sh
2712742 doc: Update FreeBSD build instructions to use bdb4 (Wladimir J. van der Laan)
d95c83d contrib: FreeBSD compatibility in install_db4.sh (Wladimir J. van der Laan)
c0298b0 contrib: Make X=Y arguments work in install_db4 (Wladimir J. van der Laan)
b798f9b contrib: New clang patch for install_db4 (Wladimir J. van der Laan)

Pull request description:

  This PR improves the BSD compatibility of the bdb4 installer script.

  See #11921, #11868.

  I've tested this on OpenBSD 6.2 (clang) and Ubuntu 16.04 (gcc).

  This needs testing on OSX at least, ~~and on gcc/Linux to make sure that applying the patch unconditionally doesn't negatively affect gcc~~.

  ~~NB: this is not yet sufficient to make `install_db4.sh` work on FreeBSD, as we need to use yet another `sha256` tool there. But it's a step in the right direction.~~

  ### contrib: New clang patch for install_db4

  Replace the clang patch with a new and improved version that also fixes the build issues with OpenBSD and FreeBSD's clang, and apply it unconditionally.

  Thanks to @fanquake for finding the patch.

  ### contrib: Make X=Y arguments work in install_db4

  Trailing X=Y arguments are supposed to be passed through unchanged to bdb's configure. This was not the case, at least with OpenBSD 6.2's shell.

  Fix this by not storing the arguments in a temporary variable but passing "$@" through directly.

  ### contrib: FreeBSD compatibility in install_db4.sh

  Unfortunately, FreeBSD uses yet another syntax for `sha256`.

  Support FreeBSD's syntax too. Using `uname` is a bit of a hack but it works and I found no way to distinguish the two.

Tree-SHA512: 12461a58dfeb4834701891762efc747c8187d834f41d98c8451edee1402a3958c4842bbc02c61bacbc7b0d90cc6b020a2ca158b65304d9760c9f0d2052ff36d4
2017-12-21 09:30:25 +01:00
MarcoFalke 604e08c83c
Merge #11726: Cleanups + nit fixes for walletdir PR
aac6b3f067 Update files.md for new wallets/ subdirectory (MeshCollider)
b67342906c Cleanups for walletdir PR (MeshCollider)

Pull request description:

  This addresses the remaining nits from https://github.com/bitcoin/bitcoin/pull/11466

  - Updates `doc/files.md` with respect to the new default wallet directory
  - Fixes @promag and @laanwj's error message nit, and Jonas' release notes nit
  - ~Addresses @laanwj's net-specific wallet subdirectory concern in the case that a walletdir is specified~
  - Changes the #includes from "" to <> style after #11651

Tree-SHA512: b86bf5fdc4de54c1b0f65b60a83af3cf82b35d216ce9c0de724803bfba6934796238b6c412659dcc29ae2e3e856d4eb97ae777c80f36f4089d8acecfddefe9aa
2017-12-20 17:37:57 -05:00
Wladimir J. van der Laan 79399c8cd0
Merge #10657: Utils: Improvements to ECDSA key-handling code
63179d0 Scope the ECDSA constant sizes to CPubKey / CKey classes (Jack Grigg)
1ce9f0a Ensure that ECDSA constant sizes are correctly-sized (Jack Grigg)
48abe78 Remove redundant `= 0` initialisations (Jack Grigg)
17fa391 Specify ECDSA constant sizes as constants (Jack Grigg)
e4a1086 Update Debian copyright list (Jack Grigg)
e181dbe Add comments (Jack Grigg)
a3603ac Fix potential overflows in ECDSA DER parsers (Jack Grigg)

Pull request description:

  Mostly trivial, but includes fixes to potential overflows in the ECDSA DER parsers.

  Cherry-picked from Zcash PR https://github.com/zcash/zcash/pull/2335

Tree-SHA512: 8fcbd51b0bd6723e5d33fa5d592f7cb68ed182796a9b837ecc8217991ad69d6c970258617dc00eb378c8caa4cec5d6b304d9d2c066acd40cda98e4da68e0caa4
2017-12-20 18:00:32 +01:00
Wladimir J. van der Laan bc66765144
Merge #11917: Add testnet DNS seed: seed.testnet.bitcoin.sprovoost.nl
f455a24 [net] add seed.testnet.bitcoin.sprovoost.nl to testnet DNS seeds (Sjors Provoost)

Pull request description:

  I tested it myself by:
  * `dig seed.testnet.bitcoin.sprovoost.nl`  (should have propagated by now, but if you only see two records with `A 66.111... ` try again later)
  * deleting the other seeds and all data in `.../testnet3`, recompiling and then starting the node. Log shows `21 addresses found from DNS seeds`.

  ACK https://github.com/bitcoin/bitcoin/blob/master/doc/dnsseed-policy.md

  I'm willing to keep it up and running at least throughout 2018, unless something bad happens.

  About my setup:
  * Amazon EC2 instance in Europe, running Ubuntu 16.04; I use this instance for some other chores, but only port 53 is world reachable (for mainnet I'd probably run a dedicated instance, and perhaps a location I have physical control over)
  * running [sipa/bitcoin-seeder](https://github.com/sipa/bitcoin-seeder) with default settings (and the non-root port redirect)
  * feedback about my domain / DNS setup is welcome, I can provide more details via private email

  I can use guidance on _Any hosting services contracted by the operator are equally expected to uphold these expectations_. Although I assume the requirements for testnet are less strict than for mainnet, in case I want to pursue the latter in the future: what unpleasant things can Amazon, my domain registrar and other intermediaries do? How would I mitigate that?

  Also note that The Netherlands passed some pretty onerous legislation creating uncertainty over what the secret service can compel people like myself to do. However these laws won't take effect before mid 2018, there's probably more interesting targets than myself to go after, and it's easier for them to just monitor all unencrypted P2P traffic everywhere, or monitor some intermediary I depend on.

  Any good tools for monitoring uptime?

Tree-SHA512: 386fe688e5006ab8352d93ab3954fc07dc566876ae002891baa51acfaa5bb113f51b1f5ca08c7394a530b10a2f5008c56d57153af3ed07544a305586dda06b97
2017-12-20 17:04:22 +01:00
Wladimir J. van der Laan d4e404a3af
Merge #11879: [tests] remove redundant univalue_tests.cpp
2862b56 [tests] remove redundant univalue_tests.cpp (John Newbery)

Pull request description:

  univalue unit tests were added in #4730 , and exist at `/src/test/univalue_tests.cpp` (outside the univalue tree). That test was brought into the univalue repository in https://github.com/bitcoin-core/univalue/pull/4 , which was pulled into the github repository in https://github.com/bitcoin/bitcoin/pull/11420.

  That means that the univalue test exists in two places:
  1. `/src/test/univalue_tests.cpp`
  2. `/src/univalue/test/object.cpp`

  (2) is a strict superset of (1). It adds some macros to work around boost not being a univalue dependency, and adds a few extra lines of test.

  Therefore remove `/src/test/univalue_tests.cpp`

Tree-SHA512: 3747b10bbf62e9f12363905488b29945ad559ddca68c5c03d8a362de612a51f408f41a04d3712c6889bfc1632fb1a5fa0d7df0fbf02c322b3981a6d698f501b0
2017-12-20 16:53:02 +01:00
Wladimir J. van der Laan 9ab9963386
Merge #11952: [qa] univalue: Bump subtree
88411e9 Squashed 'src/univalue/' changes from fe805ea74f..07947ff2da (MarcoFalke)

Pull request description:

  Pulls in the test changes to the univalue subtree.

  Beside looking at the code, reviewers should refer to https://github.com/bitcoin/bitcoin/blob/master/contrib/devtools/README.md#git-subtree-checksh on how to verify the subtree pull.

Tree-SHA512: 09493625a573dca1140570326ee90c1bb84e4893e1dab2cdd51bc23ae1fba1e33c43ed771ca9e112ac71b0242e8a8d058071334562c738d502587eadd5a0f114
2017-12-20 16:51:39 +01:00
Wladimir J. van der Laan 2712742ef2 doc: Update FreeBSD build instructions to use bdb4
Use Berkeley DB 4 as recommended on other platforms.
2017-12-20 15:16:01 +01:00
Wladimir J. van der Laan d95c83d193 contrib: FreeBSD compatibility in install_db4.sh
Unfortunately, FreeBSD uses yet another syntax for `sha256`.

Support FreeBSD's syntax too. Using `uname` is a bit of a hack but it
works and I found no way to distinguish the two.
2017-12-20 14:58:39 +01:00
Wladimir J. van der Laan 4307062ee2
Merge #11960: [Doc] Fix link to installation script
3d3e58e [Doc] Fix link to installation script (laudaa)

Pull request description:

  While trying to set up a fresh build by following the Doc, I've noticed that the scripts to the installation script are broken. They try to go to:
  https://github.com/bitcoin/bitcoin/blob/master/doc/contrib/install_db4.sh, but should go to:
  https://github.com/bitcoin/bitcoin/blob/master/contrib/install_db4.sh

Tree-SHA512: db7df9dbfdd946c6edc07e10b6717cbb82083f974f11765dc2b6942d20d1569f54bf63da34cf29ee12ba2217e342574d382e4dc61ee2d2617f40e87b538ab76a
2017-12-20 14:37:24 +01:00
laudaa 3d3e58e46c [Doc] Fix link to installation script 2017-12-20 13:39:16 +01:00
Wladimir J. van der Laan 1fb34e0d1f
Merge #11951: Remove dead feeest-file read code for old versions
62e7c04 Remove dead feeest-file read code for old versions (Matt Corallo)

Pull request description:

  0.15.0 introduced a new feeest file format, and support for parsing
  old versions was never fully added. We now simply fail to read the
  old format, so remove the dead partial-implementation.

  Follow up to #11273.

Tree-SHA512: c291ce51b7cb0c93479c18a1885dd646cbe03e4c7d12df03c0e99c0634e1bf9f9e41facf54a645227154bab58b9988f21b928cf3fc0520087c4eede4258c8861
2017-12-20 10:41:37 +01:00
Wladimir J. van der Laan cfd99ddc3c
Merge #11883: Add configuration file/argument testing
be9a13c Add configuration/argument testing (MeshCollider)

Pull request description:

  Adds a new functional test for testing various command line and configuration file argument interactions, that aren't specific enough to other functionality to be placed in other tests.

  Currently this tests the error messages for non-existent datadir, which would have caught the bug fixed in https://github.com/bitcoin/bitcoin/pull/11829. It also tests that command line arguments override the ones in the config file.

  I plan on working on a fix for https://github.com/bitcoin/bitcoin/issues/11819 / https://github.com/bitcoin/bitcoin/issues/1044 and then expanding this test with cases for that.

Tree-SHA512: 97aea18c67d331db3ca3d0c99c79267cf012df67fddafc9fac63d392f5c3a6469aa14d93b5865c3bbe561461648d2485367978a77446483b8df53d1916f1c8e8
2017-12-20 09:37:36 +01:00
MeshCollider be9a13c8a0 Add configuration/argument testing 2017-12-20 12:23:12 +13:00
MarcoFalke fad349c507 univalue: Bump subtree 2017-12-19 16:44:57 -05:00
MarcoFalke 88411e98e5 Squashed 'src/univalue/' changes from fe805ea74f..07947ff2da
07947ff2da Merge #9: [tests] Fix BOOST_CHECK_THROW macro
ec849d9a28 [tests] Fix BOOST_CHECK_THROW macro
31bc9f5a49 Merge #8: Remove unused Homebrew workaround
fa042093d1 Remove HomeBrew workaround
a523e08ae4 Merge #7: Declare single-argument (non-converting) constructors "explicit"
a9e53b38ba Merge #4: Pull upstream
16a1f7f6e9 Merge #3: Pull upstream
daf1285af6 Merge pull request #2 from jgarzik/master
f32df99e96 Merge branch '2016_04_unicode' into bitcoin
280b191cb1 Merge remote-tracking branch 'jgarzik/master' into bitcoin
2740c4f712 Merge branch '2015_11_escape_plan' into bitcoin

git-subtree-dir: src/univalue
git-subtree-split: 07947ff2da9ef02a9dfa13346bc5545708e3ebe7
2017-12-19 16:44:08 -05:00
MarcoFalke 18a1bbad98
Merge #11867: Improve node network test
ee5efad6cf [tests] refactor node_network_limited (John Newbery)
b425131f5a [tests] remove redundant duplicate tests from node_network_limited (John Newbery)
2e02984591 [tests] node_network_limited - remove race condition (John Newbery)
dbfe294805 [tests] define NODE_NETWORK_LIMITED in test framework (John Newbery)
1285312048 [tests] fix flake8 warnings in node_network_limited.py (John Newbery)

Pull request description:

  Fixes race condition in the node_network_limited test case introduced in #11740. Also tidies up the test and removes redundant duplicate tests.

Tree-SHA512: a5240fe35509d81a47c3d3b141a956378675926093e658d24be43027b20d3b5f0ba7c6017c8208487a1849d4fdfb911a361911d571423db7c50711250aba3011
2017-12-19 15:16:33 -05:00
John Newbery ee5efad6cf [tests] refactor node_network_limited 2017-12-19 11:20:12 -05:00
John Newbery b425131f5a [tests] remove redundant duplicate tests from node_network_limited 2017-12-19 11:20:12 -05:00
John Newbery 2e02984591 [tests] node_network_limited - remove race condition
node_network_limited had a race condition, since wait_for_block()
doesn't do what you might expect. It only checks the most recent block
received over the P2P interface (perhaps we should rename the method
wait_for_most_recent_block() to avoid future confusion). The test can
fail if the node sends us invs for other blocks, we respond with a
getdata, and the node sends us one of those blocks in the 0.05 second
wait_until loop window.

Fix this by not responding to inv messages with getdata messages.
2017-12-19 11:20:12 -05:00
John Newbery dbfe294805 [tests] define NODE_NETWORK_LIMITED in test framework 2017-12-19 11:19:55 -05:00
John Newbery 1285312048 [tests] fix flake8 warnings in node_network_limited.py 2017-12-19 11:19:55 -05:00
Matt Corallo 62e7c04fb8 Remove dead feeest-file read code for old versions
0.15.0 introduced a new feeest file format, and support for parsing
old versions was never fully added. We now simply fail to read the
old format, so remove the dead partial-implementation.
2017-12-19 11:19:28 -05:00
Wladimir J. van der Laan cdd6bbf10a
Merge #11273: Ignore old format estimation file
3a3a9f9 Ignore old format estimation file (Murch)

Pull request description:

  The fee estimation data format changed from 0.14.x to 0.15.0, so we should no longer read the old data. H/T @jnewbery, @morcos

  Pending testing.

Tree-SHA512: c8e3824dbdd8f6730133d5ad20b00995e9a63ab54431158a91e2f4d2aba5763b8aa698bce1fffca2713ba3a162e23d8fcd6e3efb9847b015c2e1e8725398150b
2017-12-19 17:09:59 +01:00
Wladimir J. van der Laan 81c89e966e
Merge #11923: Wallet : remove unused fNoncriticalErrors variable from CWalletDB::FindWalletTx
ecf9b25 remove unused fNoncriticalErrors variable from CWalletDB::FindWalletTx (Pierre Rochard)

Pull request description:

  The `CWalletDB::FindWalletTx` method was patterned after `CWalletDB::LoadWallet`, where `fNoncriticalErrors` is used when a tx check fails in `ReadKeyValue`.

  Since `FindWalletTx` is only used by methods which are zapping txs, it makes sense that `ReadKeyValue` is not called and the tx is not checked, so I think that deleting the unused `fNoncriticalErrors` boolean variable and its conditional statement is appropriate.

Tree-SHA512: 0976eae97522719fdaeca1fb3f4a080561e46c06d0b8dc75e14262c6bc242998db3f7057183a230a1d7e4ac5fc348e9059f545b7d718ebbcdf6dcdfc63bcc286
2017-12-19 16:16:39 +01:00
MarcoFalke 8049241e22
Merge #11946: tests: Remove unused variable (firstAddrnServices)
bdaed47558 tests: Remove unused variable (firstAddrnServices) (practicalswift)

Pull request description:

  Remove unused variable (`firstAddrnServices`).

Tree-SHA512: 7075952b392227c00fcb22adb1fd3f7ef31d7fd7101fbeff632beeea814c70beaef5c9957736eff2451976c8b43b950fc949642e608b610c5fefd150282eafb0
2017-12-19 08:12:53 -05:00
MarcoFalke 797441ee99
Merge #11947: test: Fix rawtransactions test
4508519250 test: Fix rawtransactions test (Wladimir J. van der Laan)

Pull request description:

  Looks like another `assert_raises_jsonrpc` snuck in with #11178. Change it to `assert_raises_rpc_error`.

Tree-SHA512: c2c2fb78be5dcc490981896cf60be1fba0b41c385a4f18de084b2e0a042c5b06bf6da617d3bf3b7e585b728554f5c8e1814b85045ba542cca9dfb7b826fda75a
2017-12-19 08:08:51 -05:00
Wladimir J. van der Laan 4508519250
test: Fix rawtransactions test
Looks like another `assert_raises_jsonrpc` snuck in with #11178.
Change it to `assert_raises_rpc_error`.
2017-12-19 13:24:51 +01:00
practicalswift bdaed47558 tests: Remove unused variable (firstAddrnServices) 2017-12-19 13:17:58 +01:00
Wladimir J. van der Laan 2971fd030f
Merge #11220: Check specific validation error in miner tests
12781db [Tests] check specific validation error in miner tests (Sjors Provoost)

Pull request description:

  ## Problem

  `BOOST_CHECK_THROW` merely checks that some `std::runtime_error` is
  thrown, but not which one.

  Here's an example of how this can cause a test to pass when a developer
  introduces a consensus bug. The test for the sigops limit assumes
  that `CreateNewBlock` fails with `bad-blk-sigops`. However it can
  also fail with bad-txns-vout-negative, if a naive developer lowers
  `BLOCKSUBSIDY` to `1*COIN`.

  ## Solution

  `BOOST_CHECK_EXCEPTION` allows an additional predicate function. This
  commit uses this for all exceptions that are checked for in
  `miner_tets.cpp`:
  * `bad-blk-sigops`
  * `bad-cb-multiple`
  * `bad-txns-inputs-missingorspent`
  * `block-validation-failed`

  If the function throws a different error, the test will fail. Although the message produced by Boost is a bit [confusing](http://boost.2283326.n4.nabble.com/Test-BOOST-CHECK-EXCEPTION-error-message-still-vague-tt4683257.html#a4683554), it does show which error was actually thrown. Here's what the above `1*COIN` bug would result in:

  <img width="1134" alt="schermafbeelding 2017-09-02 om 23 42 29" src="https://user-images.githubusercontent.com/10217/29998976-815cabce-9038-11e7-9c46-f5f6cfb0ca7d.png">

  ## Other considerations

  A more elegant solution in my opinion would be to subclass `std::runtime_error` for each `INVALID_TRANSACTION` type, but this would involve touching consensus code.

  I put the predicates in `test_bitcoin.h` because I assume they can be reused in other test files. However [serialize_tests.cpp](https://github.com/bitcoin/bitcoin/blob/v0.15.0rc3/src/test/serialize_tests.cpp#L245) also uses `BOOST_CHECK_EXCEPTION` and it defines the predicate in the test file itself.

  Instead of four `IsRejectInvalidReasonX(std::runtime_error const& e)` functions, I'd prefer something reusable like `bool IsRejectInvalidReason(String reason)(std::runtime_error const& e)`, which would be used like `BOOST_CHECK_EXCEPTION(functionThatThrows(), std::runtime_error, IsRejectInvalidReason("bad-blk-sigops")`. I couldn't figure out how to do that in C++.

Tree-SHA512: e364f19b4ac19f910f6e8d6533357f57ccddcbd9d53dcfaf923d424d2b9711446d6f36da193208b35788ca21863eadaa7becd9ad890334d334bccf8c2e63dee1
2017-12-19 13:06:01 +01:00
Wladimir J. van der Laan c0298b06e5 contrib: Make X=Y arguments work in install_db4
Trailing X=Y arguments are supposed to be passed through unchanged
to bdb's configure. This was not the case, at least with OpenBSD
6.2's shell.

Fix this by not storing the arguments in a temporary variable but
passing "$@" through directly.
2017-12-19 12:53:45 +01:00
Wladimir J. van der Laan b798f9bab9 contrib: New clang patch for install_db4
Replace the clang patch with a new and improved version that also fixes
the build issues with OpenBSD and FreeBSD's clang, and apply it
unconditionally.

This needs testing on OSX.
2017-12-19 12:53:34 +01:00
Wladimir J. van der Laan 1808660c8d
Merge #11943: contrib: fix typo in install_db4.sh help message
ce552b6 contrib: fix typo in install_db4.sh help message (Wladimir J. van der Laan)

Pull request description:

  It installs db4, not db5.

Tree-SHA512: c503819bd46da1fc5bd386fbf7cab1702ed8a9f0532a5f9e81f8737dfc1c7883eddf54d7de78418f327e60627ed344f94b1c2819101971e0f170b2c4c0ba4efe
2017-12-19 11:33:16 +01:00
Wladimir J. van der Laan ce552b62e4
contrib: fix typo in install_db4.sh help message
It installs db4, not db5.
2017-12-19 10:00:25 +01:00
Wladimir J. van der Laan fee0370fd6
Merge #11178: Add iswitness parameter to decode- and fundrawtransaction RPCs
6f39ac0 Add test for decoderawtransaction bool (MeshCollider)
bbdbe80 Add iswitness parameter to decode- and fundrawtransaction RPCs (MeshCollider)

Pull request description:

  Suggested in https://github.com/bitcoin/bitcoin/pull/10481#issuecomment-325244946, this adds the option to explicitly choose whether a serialized transaction should be decoded as a witness or non-witness transaction rather than relying on the heuristic checks in #10481. The parameter defaults to relying on #10481 if not included, but it overrides that if included.

Tree-SHA512: d4846a5bb7d64dc19c516445488b00af329fc1f4181d9dfdf9f2382a086568edc98250a4ac7594e24a1bc231dfdee53c699b12c8380c355b920a67cc6770b7a9
2017-12-19 09:55:11 +01:00
Wladimir J. van der Laan 483bb67253
Merge #11936: [build] Warn that only libconsensus can be built without Boost
3eb4d45 [build] Warn that only libconsensus can be built without boost (Varunram)

Pull request description:

  This replaces the "configure: error: Could not find a version of the boost_system library!" message you receive when trying to build without Boost, with "only libbitcoinconsensus can be built without boost".

  `./configure --with-utils=no --disable-bench --disable-gui-tests --disable-tests --with-daemon=no --without-gui --disable-wallet --with-boost=no` builds libconsensus.

  `./configure --with-boost=no` should always fail with:
  ```
  checking whether to build Bitcoin Core GUI... yes (Qt5)
  configure: error: only libbitcoinconsensus can be built without boost
  ```

  For anyone wondering why the check comes after the AX_BOOST_BASE check, see this [comment](https://github.com/bitcoin/bitcoin/pull/11806#discussion_r155359394). "the AX_BOOST_BASE macro that does the --with-boost handling (along with the actual checks), and sets "want_boost". "

  Fixes #10826, replaces #11806.

  @theuni if you re-ACK we can get this merged.

Tree-SHA512: f0b8f483586465187ca6689e731b24ff77da41a06fb5c9d6390c82990719911dd54ebcccaf6d4fcea2be92986cc7fa88ed979e6cb9d77917920181e5e5188067
2017-12-19 09:18:44 +01:00
Varunram 3eb4d4595c
[build] Warn that only libconsensus can be built without boost 2017-12-18 14:32:22 +08:00
Pierre Rochard ecf9b25a03 remove unused fNoncriticalErrors variable from CWalletDB::FindWalletTx 2017-12-17 11:01:23 -05:00
MarcoFalke 62fdf9b070
Merge #11916: Typo fix
58c909d8d1 Typo fix (flack)

Pull request description:

Tree-SHA512: 8ed89086230a257f4e3261972420feef60ceb618bfe75e0392a1c0cef72c20a55259bc9aec4fa79ef27c6ac8e7aec1275ff442efa539c5951b6e7c695883ab1b
2017-12-16 13:38:22 -05:00
Sjors Provoost f455a24da7
[net] add seed.testnet.bitcoin.sprovoost.nl to testnet DNS seeds 2017-12-16 16:48:48 +01:00
flack 58c909d8d1
Typo fix 2017-12-16 13:29:26 +01:00
Wladimir J. van der Laan df71819524
Merge #11886: Clarify getbalance meaning a tiny bit in response to questions.
c79d73d Clarify getbalance meaning a tiny bit in response to questions. (Matt Corallo)

Pull request description:

  Someone was asking why getbalance "*" was more "correct" than getbalance, which should rarely be true...spendzeroconfchange was the issue.

Tree-SHA512: 90201cad1acec5161aee469fb4c6d737a0eb90f8380ac93abf0e41e0f02d120afcc3e2e873e5096d3655bb63bbd16fe99e72452f308d72e69139c7f6bb2d745e
2017-12-15 13:53:07 +01:00
Wladimir J. van der Laan 8585bb8f05
Merge #11616: Update ban-state in case of dirty-state during periodic sweep
57ac471 Call BannedListChanged outside of cs_setBanned lock (Jonas Schnelli)
c853812 Update ban-state in case of dirty-state during periodic sweep (Jonas Schnelli)

Pull request description:

  We do currently not update the UI during periodic ban list sweeps (via dump banlist).
  Fixes #11612

Tree-SHA512: bffbdcc03c63042177bdd511b0a9187c211c2b5011178481e8ee3e43a71eef1e4cd6b72f73672babab142b644f62f8b56f0aac1d26d3f19372b1f8644fec9395
2017-12-15 10:43:34 +01:00
Wladimir J. van der Laan c66adb286a
Merge #10839: Don't use pass by reference to const for cheaply-copied types (bool, char, etc.)
99ba0c3 Don't use pass by reference to const for cheaply-copied types (bool, char, etc.). (practicalswift)

Pull request description:

  Don't use pass by reference to const for cheaply-copied types (`bool`, `char`, etc.).

Tree-SHA512: ccad5e2695dff0b3d6de3e713ff3448f2981168cdac72d73bee10ad346b9919d8d4d588933369e54657a244b8b222fa0bef919bc56d983e1fa64b2004e51b225
2017-12-14 18:28:01 +01:00
Wladimir J. van der Laan 3c8f0a3b8e
Merge #11842: [build] Add missing stuff to clean-local
b341143 [build] Add missing stuff to clean-local - test/functional/test_framework/__pycache__ - test/cache (Karl-Johan Alm)

Pull request description:

  After doing
  ```
  ./autogen.sh && ./configure && make
  make clean
  make distclean
  ```
  and moving `.gitignore` aside, the following files still remain after this patch:
  ```
  	Makefile.in
  	aclocal.m4
  	autom4te.cache/
  	build-aux/compile
  	build-aux/config.guess
  	build-aux/config.sub
  	build-aux/depcomp
  	build-aux/install-sh
  	build-aux/ltmain.sh
  	build-aux/m4/libtool.m4
  	build-aux/m4/ltoptions.m4
  	build-aux/m4/ltsugar.m4
  	build-aux/m4/ltversion.m4
  	build-aux/m4/lt~obsolete.m4
  	build-aux/missing
  	build-aux/test-driver
  	configure
  	doc/man/Makefile.in
  	src/Makefile.in
  	src/config/bitcoin-config.h.in
  ```

  Most are automake related so I guess it's fine if they litter around.

Tree-SHA512: 7566f56a79932cc1d6ee6ff487d121e3909db57167775e1b27209d93bcc1c14e47b0fcc9c0c272c4b9df907c1bc0664f02006a21b3b6939fa50fc2a5762729e4
2017-12-14 17:42:35 +01:00
Wladimir J. van der Laan 66479c0e61
Merge #11884: Remove unused include in hash.cpp
3f09e03 Remove unused include in hash.cpp (Karl-Johan Alm)

Pull request description:

Tree-SHA512: 543a72656460fba1c5498a0b85c49601d9b0399a4ecc49f4acf4715c258918da729df388e3be724c3161438e903ee16ad3c50626a71483aa6d85ffdbb827742d
2017-12-14 17:01:05 +01:00
Wladimir J. van der Laan 2ae58d5bfb
Merge #11864: Make CWallet::FundTransaction atomic
03a5dc9 [wallet] Make CWallet::FundTransaction atomic (João Barbosa)
95d4450 [wallet] Tidy up CWallet::FundTransaction (João Barbosa)

Pull request description:

  This PR fixes a race for `setLockedCoins` when `lockUnspents` is true. For instance, it should not be possible to use the same unspent in concurrent `fundrawtransaction` calls.

  Now the `cs_main` and `cs_wallet` locks are held during `CreateTransaction` and `LockCoin`(s). Also added some style nits around the change.

Tree-SHA512: ccf383c0c5f6db775655a3e9ccd200c3bd831a83afae2b7c389564c74f7227f5bea86a4775727de2c3603b188f383f8a12d3f9d6d94f7887865c31c94ce95ef6
2017-12-14 10:38:20 +01:00
João Barbosa 03a5dc9c3c [wallet] Make CWallet::FundTransaction atomic 2017-12-14 03:18:29 +00:00
João Barbosa 95d4450a41 [wallet] Tidy up CWallet::FundTransaction 2017-12-14 03:17:58 +00:00
Matt Corallo c79d73dc94 Clarify getbalance meaning a tiny bit in response to questions. 2017-12-13 12:18:33 -05:00
Wladimir J. van der Laan d4991c0cbb
Merge #11877: Improve createrawtransaction functional tests
88af502 test: Add createrawtransaction functional tests (João Barbosa)
27c6199 test: Add multidict to support dictionary with duplicate key (laanwj) (João Barbosa)
320669a rpc: Validate replaceable type in createrawtransaction (João Barbosa)

Pull request description:

  This was motivated by the `Invalid parameter, duplicated address` test.

  Credit to @laanwj for `multidict` implementation.

Tree-SHA512: a87139ae11004b73b467db1e8a072b75e23a0622b173a5668eed383b3575d8abc709817ddd2dfdc53f55afc90750fb61331199ad5de38c1ef6d482f2bc220f74
2017-12-13 17:34:08 +01:00