Commit graph

14725 commits

Author SHA1 Message Date
practicalswift 64fb0ac016 Declare single-argument (non-converting) constructors "explicit"
In order to avoid unintended implicit conversions.
2017-08-16 16:33:25 +02:00
MarcoFalke 22e301a3d5
Merge #10901: Fix constness of ArgsManager methods
a622a1768 Fix constness of ArgsManager methods (João Barbosa)

Pull request description:

  Make `cs_args` mutex mutable so that const methods can acquire it.

  There's also tiny performance improvement by avoiding two map lookups when retrieving an argument value.

Tree-SHA512: ece58469745f2743b4b643242b51889a3d9c5b76492ed70bb74d4e5b378fff59da79fc129e499da779bf9f488c9435dda17ad1f3a804c1c30f56af422389e8bd
2017-08-16 16:09:27 +02:00
MarcoFalke c484ec6c9b
Merge #10645: Use nullptr (C++11) instead of zero (0) as the null pointer constant
36d326e8b Use nullptr instead of zero (0) as the null pointer constant (practicalswift)

Pull request description:

  Use `nullptr` instead of zero (0) as the null pointer constant.

  The road towards `nullptr` (C++11) is split into two PRs:
  * `NULL` → `nullptr` is handled in PR #10483 (scripted)
  * `0` → `nullptr` is handled in PR #10645 (manual, this PR)

  By using the C++11 keyword `nullptr` we are guaranteed a prvalue of type `std::nullptr_t`.

  For a more thorough discussion, see "A name for the null pointer: nullptr" (Sutter &
  Stroustrup), http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf

Tree-SHA512: 5412404b40a94ea2d9fc8f81573559c4ffe559749301d486b09d41a7a736345ad602d08ac590930bb00a49692b6075520cf3d543e4da6ccd5b29fa9bcc3f15ea
2017-08-16 15:55:48 +02:00
practicalswift 36d326e8b0 Use nullptr instead of zero (0) as the null pointer constant 2017-08-16 10:24:18 +02:00
Wladimir J. van der Laan d451d0bcf1
Merge #11056: disable jni in builds
844b73e disable jni in builds (Gregory Sanders)

Pull request description:

  Suggested by @theuni

  Unneeded and was causing travis issues downstream.

Tree-SHA512: 6e302d6fd73cf09c72269e7976cc40e64abdea780278c7333a5196f188f9dede12944f1e03605ec7d194b245213d0a2576bfbdbd0f6ba20154e0e9a68008851c
2017-08-16 08:30:09 +02:00
MarcoFalke a46a671e25
Merge #10957: Avoid returning a BIP9Stats object with uninitialized values
3eb53b867 Avoid returning a BIP9Stats object with uninitialized values (practicalswift)

Pull request description:

  Uninitialized data potentially used in `rpc/blockchain.cpp`:

  ```
  static UniValue BIP9SoftForkDesc(const Consensus::Params& consensusParams, Consensus::DeploymentPos id)
  {
      ...
      const ThresholdState thresholdState = VersionBitsTipState(consensusParams, id);
      ...
      if (THRESHOLD_STARTED == thresholdState)
      {
          UniValue statsUV(UniValue::VOBJ);
          BIP9Stats statsStruct = VersionBitsTipStatistics(consensusParams, id);
          statsUV.push_back(Pair("period", statsStruct.period));
          statsUV.push_back(Pair("threshold", statsStruct.threshold));
          statsUV.push_back(Pair("elapsed", statsStruct.elapsed));
          statsUV.push_back(Pair("count", statsStruct.count));
          statsUV.push_back(Pair("possible", statsStruct.possible));
          rv.push_back(Pair("statistics", statsUV));
      }
      ...
      return rv;
  }
  ```

  Friendly ping @pinheadmz :-)

Tree-SHA512: cc1debe11d81157b9fa8e6064bfec199524cd1e2d0230ff35f45d97ecabbc664df8423edb1c9e4ba3daf19bbd51ab87bb50e5e5cd279be1d2aa1f7d8b300f148
2017-08-16 02:45:19 +02:00
MarcoFalke 655970d9c6
Merge #10965: Replace deprecated throw() with noexcept specifier (C++11)
986255026 Use the noexcept specifier (C++11) instead of deprecated throw() (practicalswift)

Pull request description:

  Use the `noexcept` specifier (C++11) instead of deprecated `throw()`.

Tree-SHA512: cf9b6b18f61f2f59bbeceb2e43b5cd07a60f5e569c8def05c410cb72326d597c80cb731059969ef89fa5fddaae1242225886e6109fcb535c4ad62d56ebcdf1ea
2017-08-16 02:29:18 +02:00
MarcoFalke b6a48914c5
Merge #9964: Add const to methods that do not modify the object for which it is called
6e8c48dc5 Add const to methods that do not modify the object for which it is called (practicalswift)

Pull request description:

Tree-SHA512: a6888111ba16fb796e320e60806e1a77d36f545989b5405dc7319992291800109eab0b8e8c286b784778f41f1ff5289e7cb6b4afd7aec77f385fbcafc02cffc1
2017-08-16 02:09:49 +02:00
MarcoFalke 7db65c363a
Merge #11011: [Trivial] Add a comment on the use of prevector in script.
08f71c29e [Trivial] Add a comment on the use of prevector in script. (Gregory Maxwell)

Pull request description:

Tree-SHA512: 020981516e67e576685eb9a8532178fb97d1780af409fc86d869cd05c293c0c823c26e838cf544d18610f5a3f479ce3e47d2ccb95fb1c4e55fe9e7ceb354f20b
2017-08-16 01:29:09 +02:00
MarcoFalke 6366941275
Merge #10680: Fix inconsistencies and grammar in various files
1d8df0141 Fix MD formatting in REST-interface.md and spelling mistake in test_runner.py (MeshCollider)
41f3e84aa Fix inconsistencies and grammar in various files (MeshCollider)

Pull request description:

  Just a simple fix of some inconsistent capitalization, formatting and grammar in a few files (no code changes)

Tree-SHA512: 60b12a5a5c69a1af4a25b7db0b32ed806ed62ad2966cee08b3792a7cfa7f51848fd485349b4c09e60a7eedfdf55ee730c51daa066d6e226ae404c93342bf3e13
2017-08-16 00:46:40 +02:00
MarcoFalke 4fb2586661
Merge #10956: Fix typos
9d5e98ff8 Fix typos. (practicalswift)

Pull request description:

  Fix some typos not covered by #10705.

Tree-SHA512: f06e9541f6ae13ef5d6731399b61795997b21a8816abeb1749c93e99a5c47354e6cbd4a3d145f4dc6ef8a13db179799a3121ecbb7288abf3e8d81cdf81500d37
2017-08-16 00:37:18 +02:00
MarcoFalke d7be7b39fa
Merge #10705: Trivial: spelling fixes
f42fc1d50 doc: spelling fixes (klemens)

Pull request description:

  patch contains some spelling fixes ( just in comments ) as found by a bot ( http://www.misfix.org, https://github.com/ka7/misspell_fixer ).

Tree-SHA512: ba6046cfcd81b0783420daae7d776be92dd7b85a593e212f8f1b4403aca9b1b6af12cef7080d4ea5ed4a14952fd25e4300109a59c414e08f5395cdb9947bb750
2017-08-16 00:30:12 +02:00
klemens f42fc1d508 doc: spelling fixes 2017-08-16 00:24:39 +02:00
MarcoFalke 85aec87b11
Merge #10711: [tests] Introduce TestNode
789733891 [tests] Introduce TestNode (John Newbery)

Pull request description:

  Continues #10082

  TestNode is a class responsible for all state related to a bitcoind node
  under test. It stores local state, is responsible for tracking the
  bitcoind process and delegates unrecognised messages to the RPC
  connection.

  This commit changes start_nodes and stop_nodes to start and stop the
  bitcoind nodes in parallel, making test setup and teardown much faster.

  On my vm, this changeset reduces total test_runner runtime for the base set of tests
  (including building the cache) from 263s to 195s (a 25% speedup). Note that the time
  reported by test_runner does not include time spent building the cache:

  *with TestNode*:
  ```
  → date +"%T" ; ./test_runner.py -q ; date +"%T"
  12:48:04
  ..................................................................................................................................................................................................................................................................................................................................
  TEST                           | STATUS    | DURATION

  abandonconflict.py             | ✓ Passed  | 12 s
  bip68-112-113-p2p.py           | ✓ Passed  | 19 s
  blockchain.py                  | ✓ Passed  | 8 s
  bumpfee.py                     | ✓ Passed  | 13 s
  decodescript.py                | ✓ Passed  | 3 s
  disablewallet.py               | ✓ Passed  | 3 s
  disconnect_ban.py              | ✓ Passed  | 6 s
  fundrawtransaction.py          | ✓ Passed  | 37 s
  getchaintips.py                | ✓ Passed  | 4 s
  httpbasics.py                  | ✓ Passed  | 3 s
  import-rescan.py               | ✓ Passed  | 4 s
  importmulti.py                 | ✓ Passed  | 6 s
  importprunedfunds.py           | ✓ Passed  | 3 s
  invalidblockrequest.py         | ✓ Passed  | 4 s
  invalidtxrequest.py            | ✓ Passed  | 4 s
  keypool.py                     | ✓ Passed  | 7 s
  listsinceblock.py              | ✓ Passed  | 4 s
  listtransactions.py            | ✓ Passed  | 33 s
  mempool_limit.py               | ✓ Passed  | 4 s
  mempool_persist.py             | ✓ Passed  | 15 s
  mempool_reorg.py               | ✓ Passed  | 4 s
  mempool_resurrect_test.py      | ✓ Passed  | 3 s
  mempool_spendcoinbase.py       | ✓ Passed  | 3 s
  merkle_blocks.py               | ✓ Passed  | 3 s
  multi_rpc.py                   | ✓ Passed  | 4 s
  net.py                         | ✓ Passed  | 3 s
  nulldummy.py                   | ✓ Passed  | 3 s
  p2p-compactblocks.py           | ✓ Passed  | 28 s
  p2p-fullblocktest.py           | ✓ Passed  | 126 s
  p2p-leaktests.py               | ✓ Passed  | 8 s
  p2p-mempool.py                 | ✓ Passed  | 3 s
  p2p-segwit.py                  | ✓ Passed  | 59 s
  p2p-versionbits-warning.py     | ✓ Passed  | 8 s
  preciousblock.py               | ✓ Passed  | 3 s
  prioritise_transaction.py      | ✓ Passed  | 5 s
  proxy_test.py                  | ✓ Passed  | 3 s
  rawtransactions.py             | ✓ Passed  | 9 s
  receivedby.py                  | ✓ Passed  | 19 s
  reindex.py                     | ✓ Passed  | 12 s
  rest.py                        | ✓ Passed  | 9 s
  rpcnamedargs.py                | ✓ Passed  | 3 s
  segwit.py                      | ✓ Passed  | 7 s
  sendheaders.py                 | ✓ Passed  | 24 s
  signmessages.py                | ✓ Passed  | 3 s
  signrawtransactions.py         | ✓ Passed  | 3 s
  txn_clone.py                   | ✓ Passed  | 4 s
  txn_doublespend.py --mineblock | ✓ Passed  | 4 s
  uptime.py                      | ✓ Passed  | 3 s
  wallet-accounts.py             | ✓ Passed  | 3 s
  wallet-dump.py                 | ✓ Passed  | 7 s
  wallet-encryption.py           | ✓ Passed  | 8 s
  wallet-hd.py                   | ✓ Passed  | 15 s
  wallet.py                      | ✓ Passed  | 31 s
  walletbackup.py                | ✓ Passed  | 104 s
  zapwallettxes.py               | ✓ Passed  | 9 s
  zmq_test.py                    | ○ Skipped | 0 s

  ALL                            | ✓ Passed  | 735 s (accumulated)
  Runtime: 189 s

  12:51:19
  ```

  *master*:
  ```
  → date +"%T" ; ./test_runner.py -q ; date +"%T"
  12:40:13
  ..........................................................................................................................................................................................................................................................................................................................................................................................................................................
  TEST                           | STATUS    | DURATION

  abandonconflict.py             | ✓ Passed  | 15 s
  bip68-112-113-p2p.py           | ✓ Passed  | 19 s
  blockchain.py                  | ✓ Passed  | 8 s
  bumpfee.py                     | ✓ Passed  | 20 s
  decodescript.py                | ✓ Passed  | 3 s
  disablewallet.py               | ✓ Passed  | 3 s
  disconnect_ban.py              | ✓ Passed  | 8 s
  fundrawtransaction.py          | ✓ Passed  | 36 s
  getchaintips.py                | ✓ Passed  | 11 s
  httpbasics.py                  | ✓ Passed  | 7 s
  import-rescan.py               | ✓ Passed  | 16 s
  importmulti.py                 | ✓ Passed  | 10 s
  importprunedfunds.py           | ✓ Passed  | 5 s
  invalidblockrequest.py         | ✓ Passed  | 4 s
  invalidtxrequest.py            | ✓ Passed  | 3 s
  keypool.py                     | ✓ Passed  | 7 s
  listsinceblock.py              | ✓ Passed  | 11 s
  listtransactions.py            | ✓ Passed  | 37 s
  mempool_limit.py               | ✓ Passed  | 4 s
  mempool_persist.py             | ✓ Passed  | 23 s
  mempool_reorg.py               | ✓ Passed  | 7 s
  mempool_resurrect_test.py      | ✓ Passed  | 3 s
  mempool_spendcoinbase.py       | ✓ Passed  | 3 s
  merkle_blocks.py               | ✓ Passed  | 10 s
  multi_rpc.py                   | ✓ Passed  | 6 s
  net.py                         | ✓ Passed  | 6 s
  nulldummy.py                   | ✓ Passed  | 3 s
  p2p-compactblocks.py           | ✓ Passed  | 30 s
  p2p-fullblocktest.py           | ✓ Passed  | 126 s
  p2p-leaktests.py               | ✓ Passed  | 8 s
  p2p-mempool.py                 | ✓ Passed  | 3 s
  p2p-segwit.py                  | ✓ Passed  | 62 s
  p2p-versionbits-warning.py     | ✓ Passed  | 8 s
  preciousblock.py               | ✓ Passed  | 8 s
  prioritise_transaction.py      | ✓ Passed  | 7 s
  proxy_test.py                  | ✓ Passed  | 10 s
  rawtransactions.py             | ✓ Passed  | 15 s
  receivedby.py                  | ✓ Passed  | 28 s
  reindex.py                     | ✓ Passed  | 12 s
  rest.py                        | ✓ Passed  | 12 s
  rpcnamedargs.py                | ✓ Passed  | 3 s
  segwit.py                      | ✓ Passed  | 12 s
  sendheaders.py                 | ✓ Passed  | 26 s
  signmessages.py                | ✓ Passed  | 3 s
  signrawtransactions.py         | ✓ Passed  | 3 s
  txn_clone.py                   | ✓ Passed  | 10 s
  txn_doublespend.py --mineblock | ✓ Passed  | 10 s
  uptime.py                      | ✓ Passed  | 3 s
  wallet-accounts.py             | ✓ Passed  | 3 s
  wallet-dump.py                 | ✓ Passed  | 6 s
  wallet-encryption.py           | ✓ Passed  | 8 s
  wallet-hd.py                   | ✓ Passed  | 18 s
  wallet.py                      | ✓ Passed  | 69 s
  walletbackup.py                | ✓ Passed  | 130 s
  zapwallettxes.py               | ✓ Passed  | 15 s
  zmq_test.py                    | ○ Skipped | 0 s

  ALL                            | ✓ Passed  | 936 s (accumulated)
  Runtime: 242 s

  12:44:36
  ```

Tree-SHA512: 6dfc4c11fd0caf7de6954c93679cf22c3df0acc6f432e616d1151062a61f456faa8ae2fe670b427868af55bb564802df84c8fd76e90b4b338750dbc23f46ad88
2017-08-15 23:35:07 +02:00
Jonas Schnelli ae47724687
Merge #11017: [wallet] Close DB on error.
03bc719a8 [wallet] Close DB on error. (Karl-Johan Alm)

Pull request description:

  This PR intends to plug some leaks. It specifically implements adherence to the requirement in BDB to close a handle which failed to open (https://docs.oracle.com/cd/E17276_01/html/api_reference/C/dbopen.html):

  > The `DB->open()` method returns a non-zero error value on failure and 0 on success. If `DB->open()` fails, the `DB->close()` method must be called to discard the DB handle.

Tree-SHA512: cc1f2b925ef3fd6de785f62108fbc79454443397f80707762acbc56757841d2c32b69c0234f87805571aa40c486da31f315ca4c607a2c7d1c97c82a01301e2a6
2017-08-15 21:24:21 +02:00
Jonas Schnelli 64e66bb262
Merge #10964: Pass SendCoinsRecipient (208 bytes) by reference
d3d946a29 Pass SendCoinsRecipient (208 bytes) by const reference (practicalswift)

Pull request description:

  Pass `SendCoinsRecipient` (208 bytes) by reference.

  Avoid passing big parameters by value.

Tree-SHA512: 504791f1b1c73badbc276db13b83e39695298d7d82a9db0e48d54e7ef02f1a8d276b0adfdece1ba1130cc214e2f0fa9a3100b5359d0ca0fe96558d3c9a786e6e
2017-08-15 20:43:45 +02:00
Gregory Sanders 844b73e486 disable jni in builds 2017-08-15 10:27:20 -07:00
John Newbery 7897338918 [tests] Introduce TestNode
TestNode is a class responsible for all state related to a bitcoind node
under test. It stores local state, is responsible for tracking the
bitcoind process and delegates unrecognised messages to the RPC
connection.

This commit changes start_nodes and stop_nodes to start and stop the
bitcoind nodes in parallel, making test setup and teardown much faster.
2017-08-15 13:12:15 -04:00
Wladimir J. van der Laan 3841aaf059
Merge #11008: Enable disablesafemode by default.
f4c3d2c Enable disablesafemode by default. (Gregory Maxwell)

Pull request description:

  Safemode is almost useless as is-- it only triggers in limited
   cases most of which aren't even concerning. There have been
   several proposals to remove it. But as a simpler, safer, and
   more flexible first case, simply deactivate it by default.

  Anyone who wants it can re-enable and know what they've signed up for.

Tree-SHA512: f5409a3e81514c32db8eb27c7563ef85e25e56e5fc2a59eac2c30b10ec54087d982c1d3b702bedf9f3133c1f272f23805582a0f468350ba18d8b5a02bedd6401
2017-08-15 17:47:55 +02:00
Wladimir J. van der Laan 140de14a12
gitian: bump descriptors for master
Tree-SHA512: dc56ab285ea3fd293794341d7e2f8452730d3efb59f793112d4e1b036a051f9d221a7e577a460b426ecfb1578558203fa6a432efc62e6cabc534059719a2b437
2017-08-14 17:38:10 +02:00
Wladimir J. van der Laan f6283b4719
build: bump version to 0.15.99
Now that 0.15 branch has been split off, master is 0.15.99 (pre-0.16).

Also clean out release notes.

Tree-SHA512: 160f712fae7bfc51e49e36a27ab01f5c243b79a19a70312df95f9bc5cb8067c70aa88911f741fd1625bee549a70655eaea24d98f6049d98c3c14ee1b3143f4cb
2017-08-14 17:28:30 +02:00
Wladimir J. van der Laan c2704ec98a
Merge #10607: scripted-diff: stop using the gArgs wrappers
fcbde90 remove unused gArgs wrappers (Marko Bencun)
bb81e17 scripted-diff: stop using the gArgs wrappers (Marko Bencun)

Tree-SHA512: 49190740dfc723d680a093b625bf4e4e010bc121741b035d790f787e73eedd74966e4ceaf56975050d06b5d7d6cd8f46f9deb5cc78569df1e9faf0d7e543ee21
2017-08-14 17:19:38 +02:00
Marko Bencun fcbde9091e remove unused gArgs wrappers 2017-08-14 17:02:36 +02:00
Marko Bencun bb81e17355 scripted-diff: stop using the gArgs wrappers
They were temporary additions to ease the transition.

-BEGIN VERIFY SCRIPT-
find src/ -name "*.cpp" ! -wholename "src/util.h" ! -wholename "src/util.cpp" | xargs perl -i -pe 's/(?<!\.)(ParseParameters|ReadConfigFile|IsArgSet|(Soft|Force)?(Get|Set)(|Bool|)Arg(s)?)\(/gArgs.\1(/g'
-END VERIFY SCRIPT-
2017-08-14 17:02:10 +02:00
Wladimir J. van der Laan 1227be30ec
doc: Update release notes from wiki
Update release notes from wiki, and fill in authors list from git.

Additional credits:

- Awemany (for #10854)
- Gregory Maxwell (release notes writing)
- John Newbery (release notes writing)
- Kibbled Jive Elk Zoo (for https://github.com/bitcoin/bitcoin/pull/10177#issuecomment-309244097)
- Luke Dashjr (release notes writing)
- Marco Falke (release notes writing)
- Pieter Wuille (release notes writing)
- Rusty Russell (release notes writing)
- tintinweb (for early-announcing miniupnp CVE-2017-8798, forgot this for 0.14.2)

Tree-SHA512: 8024eb761fcac4bb7f16ba3a9db376508f1f1bcf8a89cfb5e2928ad384675d3e912cada6ffef7d5aac181a965ebb8b823f6a63d9e976c1be753ec8eb9a8b9ef5
2017-08-14 16:50:29 +02:00
Wladimir J. van der Laan ce74799a3c
Merge #10483: scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal instead of the macro NULL
90d4d89 scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal instead of the macro NULL (practicalswift)

Pull request description:

  Since C++11 the macro `NULL` may be:
  * an integer literal with value zero, or
  * a prvalue of type `std::nullptr_t`

  By using the C++11 keyword `nullptr` we are guaranteed a prvalue of type `std::nullptr_t`.

  For a more thorough discussion, see "A name for the null pointer: nullptr" (Sutter &
  Stroustrup), http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf

  With this patch applied there are no `NULL` macro usages left in the repo:

  ```
  $ git grep NULL -- "*.cpp" "*.h" | egrep -v '(/univalue/|/secp256k1/|/leveldb/|_NULL|NULLDUMMY|torcontrol.*NULL|NULL cert)' | wc -l
  0
  ```

  The road towards `nullptr` (C++11) is split into two PRs:
  * `NULL` → `nullptr` is handled in PR #10483 (scripted, this PR)
  * `0` → `nullptr` is handled in PR #10645 (manual)

Tree-SHA512: 3c395d66f2ad724a8e6fed74b93634de8bfc0c0eafac94e64e5194c939499fefd6e68f047de3083ad0b4eff37df9a8a3a76349aa17d55eabbd8e0412f140a297
2017-08-14 16:30:59 +02:00
Wladimir J. van der Laan 0e5cff6f2b
Merge #11012: Make sure to clean up mapBlockSource if we've already seen the block
3f8fa7f Make sure to clean up mapBlockSource if we've already seen the block (Cory Fields)

Pull request description:

  Otherwise we may leave them dangling.

  Credit TheBlueMatt.

Tree-SHA512: 8be77e08ebfc4f5b206d5ee7cfbe87f92c1eb5bc2b412471993658fe210306789aaf0f3d1454c635508a7d8effede2cf5ac144d622b0157b872733d9661d65c3
2017-08-14 16:19:35 +02:00
Wladimir J. van der Laan 6bdf4b3c7c
Merge #11028: Avoid masking of difficulty adjustment errors by checkpoints
85c82b5 Avoid masking of difficulty adjustment errors by checkpoints (Pieter Wuille)

Pull request description:

  Currently difficulty adjustment violations are not reported for chains that branch off before the last checkpoint. Change this by moving the checkpoint check after the difficulty check.

Tree-SHA512: 33666f2c3459151b28c42041a463779e6df18f61d3dd5b1879a0af4e5b199ef74d1e33e06af68bebfdfb211569ad5fb56556bfebe9d63b5688d910ea211b839a
2017-08-14 16:12:55 +02:00
Wladimir J. van der Laan 653a46dd91
Merge #11022: Basic keypool topup
d34957e [wallet] [tests] Add keypool topup functional test (Jonas Schnelli)
095142d [wallet] keypool mark-used and topup (John Newbery)
c25d90f [wallet] Add HasUnusedKeys() helper (John Newbery)
f2123e3 [wallet] Cache keyid -> keypool id mappings (John Newbery)
83f1ec3 [wallet] Don't hold cs_LastBlockFile while calling setBestChain (John Newbery)
2376bfc [wallet] [moveonly] Move LoadKeyPool to cpp (Matt Corallo)
cab8557 [wallet] [moveonly] Move CAffectedKeysVisitor (Jonas Schnelli)

Pull request description:

  This PR contains the first part of #10882 :

  - if a key from the keypool is used, mark all keys up to that key as used, and then try to top up the keypool
  - top up the keypool on startup

  Notably, it does not stop the node or prevent the best block from advancing if the keypool drops below a threshold (which means that transactions may be missed and funds lost if restoring from an old HD wallet backup).

Tree-SHA512: ac681fefeaf7ec2aab2fa1da93d12273ea80bd05eb48d7b3b551ea6e5d975dd97ba7de52b7fba52993823280ac4079cc36cf78a27dac708107ebf8fb6326142b
2017-08-14 16:08:44 +02:00
Wladimir J. van der Laan 98aa3f6d5c
Merge #10968: Add instructions for parallel gitian builds.
e93ff71 Add instructions for multi-processor gitian builds (Charlie Lee)

Pull request description:

  This makes builds much faster if you have a multi-core machine.

Tree-SHA512: edb64c691a31a8a2e6c45f87886912d429a3fd600ebc0de2b16d44efd9d38bb92fea33c5fed207ad684b75d3247218912cab67661466a5538d534845e0808c9f
2017-08-14 16:00:01 +02:00
Charlie Lee e93ff718c5 Add instructions for multi-processor gitian builds 2017-08-13 12:26:04 +02:00
Gregory Maxwell 08f71c29ea [Trivial] Add a comment on the use of prevector in script. 2017-08-12 16:32:58 +00:00
MarcoFalke aeb3175627
Merge #11032: [qa] Fix block message processing error in sendheaders.py
f1bf31186 [qa] Fix block message processing error in sendheaders.py (Suhas Daftuar)

Pull request description:

  Introduced in #10169

  @jnewbery

Tree-SHA512: f330b926c51bd4f1b63738e1ddac23c58cb32345baed36343f7a989b3b9906c5c6e7dbd74b416f662c6ef68b8d256a6c69a977ec5f85789b2c1dc802bc831f6b
2017-08-12 13:22:35 +02:00
MarcoFalke ac016e17d2
Merge #11000: test: Add resendwallettransactions functional tests
bdf607e43 test: Add resendwallettransactions functional tests (João Barbosa)

Pull request description:

  Adds functional tests to cover the behaviour introduced in #10995.

Tree-SHA512: 3be337cbe51edab2cc0eb9ecfa68d00cd3c3a00aef0672cd841706802726c9cd4138626a8f209c3d9fbd207ce332daa062f270e4c94c1c2398bfc475e36423f6
2017-08-12 13:18:38 +02:00
João Barbosa bdf607e438 test: Add resendwallettransactions functional tests 2017-08-12 04:42:45 +01:00
Suhas Daftuar f1bf31186c [qa] Fix block message processing error in sendheaders.py 2017-08-11 21:36:28 -04:00
MarcoFalke bf74d377fb
Merge #11023: [tests] Add option to attach a python debugger if functional test fails
cc5d38f4b Add option to attach a python debugger if test fails (John Newbery)

Pull request description:

  Adds a simple option to the test_framework to attach pdb if the test fails.

  Helpful for catching and debugging intermittent failures: Run the test in a loop with this option. The first failure will cause execution to pause and nodes will be left running for interactive debugging.

  @sdaftuar

Tree-SHA512: 01cfae15fa3f04ed6ec6a99fef60a6c6a59723429309e81eacd6767caf12f5758f59b337804291ecab33a38a2958f36e2b513d201bee72a2eeb207a67046f952
2017-08-11 18:10:30 +02:00
MarcoFalke 2c811e08db
Merge #10765: Tests: address placement should be deterministic by default
c5ebddd11 Tests: address placement should be deterministic by default (René Nyffenegger)

Pull request description:

  Better version of wrong and closed pull request https://github.com/bitcoin/bitcoin/pull/10764

Tree-SHA512: dfda6ea4a9dd0f4c8b96212ad43a716ff1dddf115cd2712a2a7e42c97fc9494079c746906b39d880a9827c05d2b75c728afd4ca4519ce4d365f0dae0c4aec24c
2017-08-11 17:45:47 +02:00
MarcoFalke e5d26e47c7
Merge #11025: qa: Fix inv race in example_test
faa76d1b7 qa: Fix inv race in example_test (MarcoFalke)

Pull request description:

  There have been intermittent test failures on this script.

  ```py
    File "./test/functional/example_test.py", line 216, in run_test
      assert_equal(block, 1)
  AssertionError: not(2 == 1)
  ```

  Probably the simplest way to fix them is overriding the `on_inv` method, so that no "colliding" getdata for the blocks are sent out.

  Additionally, all getdata are now sent in a single message.

Tree-SHA512: 809c2bbfa90a67fc97905769fcbe90ba9abe1aac1f145530934f56a364835973b94d3302b6be68f4f2987acf333bce146bcc4c878c283301871ba5bb1a9bedb6
2017-08-11 16:58:28 +02:00
MarcoFalke 96a63a3e0c
Merge #11029: [RPC] trivial: gettxout no longer shows version of tx
86279464b [RPC] trivial: gettxout no longer shows version of tx (Felix Weis)

Pull request description:

  Since the switch to a per-txout chainstate db in #10195, the tx version information is no longer stored. Updated `gettxout` rpc help text accordingly.

Tree-SHA512: 3d7f42ef0f649056ece98bf22a1e972d1876324733adc81fa31bc2cd160550c5b6cb8682209fb8e8dbc56a8139ed5f5f0e740945f709039e69d52997ddbca7b8
2017-08-11 15:30:14 +02:00
Felix Weis 86279464b4 [RPC] trivial: gettxout no longer shows version of tx
Since the switch to a per-txout chainstate db in #10195, the tx version information is no longer stored. Updated `gettxout` rpc help text accordingly.
2017-08-11 12:16:55 +08:00
Pieter Wuille 85c82b50d1 Avoid masking of difficulty adjustment errors by checkpoints
Currently difficulty adjustment violations are not reported for
chains that branch off before the last checkpoint. Change this
by moving the checkpoint check after the difficulty check.
2017-08-10 15:39:36 -07:00
MarcoFalke faa76d1b79 qa: Fix inv race in example_test 2017-08-10 21:29:48 +02:00
Jonas Schnelli d34957e17e [wallet] [tests] Add keypool topup functional test 2017-08-10 13:50:16 -04:00
John Newbery 095142d1f9 [wallet] keypool mark-used and topup
This commit adds basic keypool mark-used and topup:

- try to topup the keypool on initial load
- if a key in the keypool is used, mark all keys before that as used and
try to top up
2017-08-10 13:44:02 -04:00
John Newbery cc5d38f4b8 Add option to attach a python debugger if test fails 2017-08-10 12:50:51 -04:00
MarcoFalke e526ca6284
Merge #10835: Rename member field according to the style guide
4d4fb33fc Rename member field according to the style guide. (Pavel Janík)

Pull request description:

  After #10193, approx. five instances of this warning are printed when compiling with `-Wshadow`:

  ```
  In file included from txmempool.cpp:14:
  ./reverse_iterator.h:20:22: warning: declaration shadows a field of 'reverse_range<T>' [-Wshadow]
      reverse_range(T &x) : x(x) {}
                       ^
  ./reverse_iterator.h:17:8: note: previous declaration is here
      T &x;
         ^
  1 warning generated.
  ```

Tree-SHA512: 6c07c2ed6f4f232a3a8bdcdd6057040967c74552fd29d80f42e8a453b95baf203c410aa31dccc08ff2e765cbba02b1a282f6ea7804955f09b31ab20ef383792e
2017-08-09 12:42:10 +02:00
Wladimir J. van der Laan 67f6f1c2d5
qt: Periodic translations update
Tree-SHA512: f967af98ba40908f3ba1286659a7ffedd1319d8d7d5c8d658f266897cb61ea28bace3f20f8ec77b83a69ac311c7e65467e40c3ee8b320a88768afa15e8c802cc
2017-08-09 12:04:41 +02:00
MarcoFalke ecd21357f1
Merge #10963: [bench] Restore format state of cout after printing with std::fixed/setprecision
fd05132e5 Restore default format state of cout after printing with std::fixed/setprecision (practicalswift)

Pull request description:

  Restore default format state of `std::cout` after printing with `std::fixed`/`std::setprecision`.

Tree-SHA512: 445b5b42aff58e2350939e8febc9b4a6fff478616abfe831aec42bee906cefac7a153c93d506407fb213d04dae9c7afbb5bfd344be63ca0f40ae39b331a4144f
2017-08-09 11:52:19 +02:00
MarcoFalke 4b5a7ce0c3
Merge #11003: Docs: Capitalize bullet points in CONTRIBUTING guide
13b1e9a16 Capitalize bullet points in CONTRIBUTING guide (Evan Klitzke)

Pull request description:

  English grammar dictates that these bullet points should be capitalized.
  This also makes the capitalization style consistent with the rest of the
  document, e.g. the "Decision Making Process" section.

Tree-SHA512: 59f5a8941180ff3862ba63d364c27fd83d2e144299a71b2e784d58f806e8a02d7951dcc80fcc7152d0c78c2d1f5a22db1236af7ea6b9abece8dbe93533e4b65c
2017-08-09 11:17:49 +02:00