Commit Graph

12224 Commits

Author SHA1 Message Date
MarcoFalke
4af8db6d33 Merge #11031: [rpc] deprecate estimatefee
048e0c3e2 [rpc] [tests] Add deprecated RPC test (Cristian Mircea Messel)
d4cdbd6fb [rpc] Deprecate estimatefee RPC (John Newbery)

Pull request description:

  Deprecates estimatefee in v0.16, for final removal in v0.17.

  This commit introduces a phased removal of RPC methods. RPC method is
  disabled by default in version x, but can be enabled by using the
  `-deprecatedrpc=<methodname>` argument. RPC method is removed entirely in version
  (x+1).

  This gives users fair warning that an RPC is to be removed, and time to change client software if necessary. Deprecation warnings in RPC return values or release notes are easily ignored.

  This is a more generic version of the approach I tried to use in #10841, which too late to make it into v0.15.

Tree-SHA512: 9695a600e84b812974387333e4a6805d18972da30befb754e9e4da77cd9815d00c5cc2ee0b0350bdbbdb5fdc6ba47789f8b2c6f5b15c8cd5a1deefcc4832da30
2020-01-11 18:47:34 -06:00
Wladimir J. van der Laan
8af0f8e2d8 Merge #11288: More user-friendly error message when partially signing
df10edf More user-friendly error message when partially signing (MeshCollider)

Pull request description:

  When partially signing a transaction using `signrawtransaction`, if the wallet doesn't have access to a key, it will output a scary error message `"error": "Operation not valid with the current stack size"`, yet it will partially sign the transaction anyway. This puts a lot of users off, because they don't realise the signing actually succeeded for some inputs. This catches that specific error when signing, and outputs a friendlier message which says `Unable to sign input, invalid stack size (possibly missing key)`.

  This is the best way I could think of to fix the issue, but please let me know if you come up with a better way to do it :)

  Fixes https://github.com/bitcoin/bitcoin/issues/9988

Tree-SHA512: 65e1d4a49caa4202e1357b0b3f42329d76456c7b4286d63232226e03267809027b0c44e0faaa1da8b86c9ad677e3a3d655698a24fc870d6a661203c9f56ef95b
2020-01-11 18:47:34 -06:00
Pieter Wuille
3ba12f24a1 Merge #11301: add m_added_nodes to connman options
35e5c2269 remove unused IsArgSet check (Marko Bencun)
605918272 add m_added_nodes to connman options (Marko Bencun)

Pull request description:

Tree-SHA512: ca4527a964dcda816b32d335e7fe4d0d8a668a83fbc5e4707ee452d00a7089fa59a88c9f2b1ecdf50e673f2a63fc364b23979e0153f91136525eceec10c2ede2
2020-01-11 18:22:25 -06:00
Pieter Wuille
d6c4485412 Merge #11351: Refactor: Modernize disallowed copy constructors/assignment
2a07f878a Refactor: Modernize disallowed copy constructors/assignment (Dan Raviv)

Pull request description:

  Use C++11's better capability of expressing an interface of a non-copyable class by publicly deleting its copy ctor and assignment operator instead of just declaring them private.

Tree-SHA512: 878f446be5a136bb2a90643aaeaca62948b575e6ef71ccc5b4b8f373e66f36ced00665128f36504e0ccfee639863d969329c4276154ef9f2a9de9137f0801e01
2020-01-11 18:22:25 -06:00
Pieter Wuille
6cf675807e Merge #10888: range-based loops and const qualifications in net.cpp
05cae8aef range-based loops and const qualifications in net.cpp (Marko Bencun)

Pull request description:

  Plus a use of std::copy() instead of manual copying.

  (The loop on line 117 is already done in #10493).

Tree-SHA512: d9839e330c71bb9781a4efa81ee353c9e3fd8a93c2120a309f7a0e516b119dd7abe0f0988546797801258b867a29581978515c05dda9e5b23097e15f705139b4
2020-01-11 18:22:25 -06:00
Alexander Block
cb33702b74
Merge pull request #3276 from PastaPastaPasta/backports-0.16-pr2
Backports 0.16 pr2
2020-01-12 01:17:33 +01:00
Alexander Block
91b4a38398 Backport bitcoin#11773: [tests] Change feature_block.py to use BitcoinTestFramework (#3277)
* [tests] Change feature_block.py to use BitcoinTestFramework

* [tests] Fix flake8 warnings in feature_block.py

* [tests] Tidy up feature_block.py

- move all helper methods to the end
- remove block, create_tx and create_and_sign_tx shortcuts
- remove --runbarelyexpensive option, since it defaults to True and it's
unlikely that anyone ever runs the test with this option set to false.

* [tests] Add logging to feature_block.py

* [tests] Improve assert message when wait_until() fails

* Merge #13048: [tests] Fix feature_block flakiness

c1d742025c [tests] Fix feature_block flakiness (John Newbery)

Pull request description:

  feature_block.py occasionally fails on Travis. I believe this is due to
  a a race condition when reconnecting to bitcoind after a subtest that
  expects disconnection. If the test runs ahead and sends the INV for the
  subsequent test before we've received the initial sync getheaders, then
  we may end up sending two headers messages - one as a response to the
  initial sync getheaders and one in response to the INV getheaders. If
  both of those headers fail validation with a DoS score of 50 or higher,
  then we'll unexpectedly be disconnected.

  There is only one validation failure that has a DoS score bewteen 50 and
  100, which is high-hash. That's why the test is failing immediately
  after the "Reject a block with invalid work" subtest.

  Fix is to wait for the initial getheaders from the peer before we
  start populating our blockstore. That way we won't have any invalid
  headers to respond to it with.

Tree-SHA512: dc17d795fcfaf0f8c0bf1e9732b5e11fbc8febbfafba4c231b7c13a5404a2c297dcd703a7a75bc7f353c893e12efc87f424f2201abd47ba5268af32d4d2e841f

* Temporarely rename MAX_BLOCK_SIZE -> MAX_BLOCK_BASE_SIZE

We'll undo this after the next commit. This avoids merge many conflicts and
makes reviewing easier.

* Rename MAX_BLOCK_BASE_SIZE back to MAX_BLOCK_SIZE

* Use DoS score of 100 for bad-blk-sigops

This was accidently changed to 10 while backporting bitcoin#7287 and causes
test failures in p2p-fullblocktest.py

* Use allowOptimisticSend=true when sending reject messages

This fixes test failures in p2p-fullblocktest.py which expects reject
messages to be sent/received before connections get closed.

* Fix p2p-fullblocktest.py

- CBlock and friends are still in test_framework.mininode
- "-whitelist" causes connections to not be dropped, which in turn causes
  sync_blocks with reconnect=True to fail
- "bad-cb-amount" does not cause a ban in Dash, so reconnect must be False
- Dash already bans when a header is received which is a child of an invalid
  header, causing block requests to never happen

* Backport missing changes from bitcoin#13003

bitcoin#13003 was backported out of order which causes missed changes.

* Bump p2p-fullblocktest timeouts

* Increase RPC timeout in p2p-fullblocktest.py

Co-authored-by: John Newbery <jonnynewbs@gmail.com>
Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2020-01-11 04:31:25 +03:00
UdjinM6
d570557920
Fix whitespaces to make linter happy 2020-01-10 10:34:04 -06:00
UdjinM6
7f14febfb4
Fixes after 10753 2020-01-10 10:34:04 -06:00
UdjinM6
5f8bcacd7f
More of 10793 2020-01-10 10:34:03 -06:00
UdjinM6
5857ec7154
More of 10969 2020-01-10 10:34:03 -06:00
Wladimir J. van der Laan
b03608d5c2
Merge #11469: fix typo in comment of chain.cpp
f902e40 fix typo in comment of chain.cpp (Johannes Kanig)

Pull request description:

Tree-SHA512: 1af049bd75f244febc2c249f7b743b481ed6ce935f1f5265881f57064d69e0f055b9334dae765132348125a5e688f99b07a255de7deacf37ac57d1e6966b5e4b
2020-01-10 10:34:02 -06:00
MarcoFalke
07de9ee889
Merge #11408: Trivial: Fix parameter name typo in ErasePurpose walletdb method
603efe9fc Fix parameter name typo in ErasePurpose walletdb method. (Pierre Rochard)

Pull request description:

  The header file has the correct method signature and the one usage in CWallet::DelAddressBook is correctly passing in EncodeDestination(address)

Tree-SHA512: ee0808a74111fd23a1c47ba5ab51de151fdd33a01d92895671e562ac184cbcb33180a3ff26c22e5717595592097b9fa33deca9878d89ce8d34687f09cfadfcf0
2020-01-10 10:34:02 -06:00
Wladimir J. van der Laan
44b47017ef
Merge #11385: Remove some unused functions and methods
46c9043 Remove some unused functions and methods (Pieter Wuille)

Pull request description:

  In the case of CKey's destructor, it seems to have been an oversight in #8753 not to delete it. At this point, it results in the move constructors/assignment operators for CKey being deleted, which may have
  a performance impact (requiring a pool allocation/copy/free, rather than just handing over the pointer from one CKey to another)

Tree-SHA512: 89715bafe3e0bea2c46fc92bc6a1010360a3fee2719f97b81ca379581003409b0876b50f992208a3c13c7f5b77f1866db09954e7d102f6a452fe5d7aed2044a1
2020-01-10 10:34:01 -06:00
Wladimir J. van der Laan
c8081ae192
Merge #11132: Document assumptions that are being made to avoid NULL pointer dereferences
fdc3293 Document assumptions that are being made to avoid NULL pointer dereferences (practicalswift)

Pull request description:

  Document assumptions (via `assert(…)`:s) that are being made avoid `NULL` pointer dereferences.

  Rationale:
  * Make it clear to human reviewers and non-human static analyzers that what might look like potential `NULL` pointer dereferences are written the way they are intentionally (these cases are currently flagged by various static analyzers).

Tree-SHA512: b424328195e2680e1e4ec546298f718c49e5ad182147dc004de580693db1b50eec4065e1c4f232bdb302baa12954265a50ba21cb5ba4ff30248535b2de778672
2020-01-10 10:34:00 -06:00
MarcoFalke
218f65d208
Merge #11340: Trivial: Fix validation comments
a0b4c2461 Trivial: Fix validation comments (Dan Raviv)

Pull request description:

  - Move comment about transaction/block weight calculation so it applies not only to the GetBlockWeight function but also to GetTransactionWeight
  - Fix comment in validation.cpp referencing future deployment of BIP113. It has already been deployed.
  - The doc comment for BLOCK_DOWNLOAD_WINDOW wasn't updated since pruning was introduced, so it still refers to pruning as something that might happen in the future. A larger BLOCK_DOWNLOAD_WINDOW window would now, indeed, make pruning harder.

Tree-SHA512: ff86ff02c993e8317b9a0decfe5f5b6aae77b7d50e2b253ed73eb553348142bfc30cfeda15fae91907bab8f920e0ea7c52714f4cc7f33a9d6a777f708e2c99ba
2020-01-10 10:34:00 -06:00
MarcoFalke
45d1923490
Merge #11330: Trivial: Fix comments for DEFAULT_WHITELIST[FORCE]RELAY
dc2f737ae Trivial: Fix comments for DEFAULT_WHITELIST[FORCE]RELAY (danra)

Pull request description:

Tree-SHA512: 1156a34f19be81029e736a672df4eda4578ccfea2b3446356c071409db2652e4517246a8e4c23f7c2bf3d6cd8c61501db05fbf6628c1c55ca8f9e04107f3eab8
2020-01-10 10:33:59 -06:00
MarcoFalke
99ccb6ebdd
Merge #10767: [wallet] Clarify wallet initialization / destruction interface
5d2a3995e [trivial] fixup comment for VerifyWallets() (John Newbery)
43b0e81d0 [wallet] Add StartWallets() function to wallet/init.cpp (John Newbery)
290f3c56d [wallet] Add RegisterWalletRPC() function to wallet/init.cpp (John Newbery)
062d63102 [wallet] Add CloseWallets() function to wallet/init.cpp (John Newbery)
77fe07c15 [wallet] Add StopWallets() function to wallet/init.cpp (John Newbery)
2da5eafa4 [wallet] Add FlushWallets() function to wallet/init.cpp (John Newbery)
1b9cee66e [wallet] Rename WalletVerify() to VerifyWallets() (John Newbery)
9c76ba18c [wallet] Rename InitLoadWallet() to OpenWallets() (John Newbery)

Pull request description:

  Apologies for the mostly code move only PR. This is a pre-req for both #10740 and #10762

  All wallet component initialization/destruction functions are now in their own `wallet/init.cpp` translation unit and are no longer static functions on the CWallet class. The bitcoin_server also no longer has any knowledge that there are multiple wallets in vpwallet.

  There should be no changes in behavior from this PR.

Tree-SHA512: 7c260eb094f2fa1a88d803769ba60935810968a7309f731135e4b17623b97f18c03bbcd293c942093d1efce62c6c978f9ff484d54dc9a60bc2fcb5af2d160fcd
2020-01-10 10:33:59 -06:00
Wladimir J. van der Laan
ec496efdb9
Merge #11238: Add assertions before potential null deferences
c00199244 Fix potential null dereferences (MeshCollider)

Pull request description:

  Picked up by the static analyzer [Facebook Infer](http://fbinfer.com/) which I was playing around with for another research project. Just adding some asserts before dereferencing potentially null pointers.

Tree-SHA512: 9c01dab2d21bce75c7c7ef867236654ab538318a1fb39f96f09cdd2382a05be1a6b2db0a1169a94168864e82ffeae0686a383db6eba799742bdd89c37ac74397
2020-01-10 10:33:59 -06:00
Pasta
5d4e6dc9ae
keep nVersion as 16 byte integer
Signed-off-by: Pasta <pasta@dashboost.org>
2020-01-10 10:33:58 -06:00
Wladimir J. van der Laan
6962568009
Merge #8330: Structure Packing Optimizations in C{,Mutable}Transaction
37495e0d8 Reorder C{,Mutable}Transaction for better packing (Jeremy Rubin)

Pull request description:

  These commits revise the layout of a few key classes to eliminate padding, eliminating useless memory overhead.

  -This reduces CTransaction from 96 bytes to 88 bytes

Tree-SHA512: 91d1fec363edebbb1f1a5b98142c767511e99d3be857148a76e31cc512c9ab3d153083fa6b46b6407974d3b88de984b436c33e8606fbb2b273d74c825195aa17
2020-01-10 10:33:58 -06:00
MarcoFalke
9f672f82a1
Merge #11173: RPC: Fix currency unit string in the help text
47ba2c312 Fix currency/fee-rate unit string in the help text (Akio Nakamura)

Pull request description:

  1. The RPC help text should use the constant `CURRENCY_UNIT` defined in `policy/feerate.cpp` instead of the literal `'BTC'`.
    In the following 2 RPC commands, `'BTC'` is written directly in the help text.
    This commit changes them to use that constant.
       1) `estimatesmartfee`
       2) `estimaterawfee`

  2. Some RPC command use `'satoshis'` as the unit.
    It should be written as `'satoshis'` instead of `'Satoshis'` in the RPC help text.
    So, this commit fixes this typo in `getblocktemplate`.

Tree-SHA512: d0bd1cd90560e59bf456b076b958a2a1c998f85a7e65aeb6b2abcaba18919a3ae62f7c3909210461084c1a3275a35b6ba3ea3ec8f5cce33702ffe383c9e84bce
2020-01-10 10:33:57 -06:00
Russell Yanofsky
fc4ab83c83
Merge #10976: [MOVEONLY] Move some static functions out of wallet.h/cpp #10976
Move some static functions out of wallet.h/cpp

This commit just moves a few function declarations and updates callers.
Function bodies are moved in two followup MOVEONLY commits.

This change is desirable because wallet.h/cpp are monolithic and hard to
navigate, so pulling things out and grouping together pieces of related
functionality should improve the organization.

Another proximate motivation is the wallet process separation work in
https://github.com/bitcoin/bitcoin/pull/10973, where (at least initially)
parameter parsing and fee estimation are still done in the main process rather
than the wallet process, and having functions that run in different processes
scrambled up throughout wallet.cpp is unnecessarily confusing.

MOVEONLY: Fee functions wallet/wallet.cpp -> wallet/fees.cpp

make it actual move only

Signed-off-by: Pasta <pasta@dashboost.org>

MOVEONLY: Init functions wallet/wallet.cpp -> wallet/init.cpp

make it actual move only

Signed-off-by: Pasta <pasta@dashboost.org>

add keepass include

Signed-off-by: Pasta <pasta@dashboost.org>
2020-01-10 10:33:57 -06:00
Wladimir J. van der Laan
fdf3f25a0a
Merge #10969: Declare single-argument (non-converting) constructors "explicit"
64fb0ac Declare single-argument (non-converting) constructors "explicit" (practicalswift)

Pull request description:

  Declare single-argument (non-converting) constructors `explicit`.

  In order to avoid unintended implicit conversions.

  For a more thorough discussion, see ["C.46: By default, declare single-argument constructors explicit"](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit) in the C++ Core Guidelines (Stroustrup & Sutter).

Tree-SHA512: e0c6922e56b11fa402621a38656d8b1122d16dd8f160e78626385373cf184ac7f26cb4c1851eca47e9b0dbd5e924e39a85c3cbdcb627a05ee3a655ecf5f7a0f1
2020-01-10 10:33:57 -06:00
MarcoFalke
094298d187
Merge #10691: Trivial: Properly comment about shutdown process in init.cpp file.
581c41157 Properly comment about shutdown process in init.cpp file (Kyuntae Ethan Kim)

Pull request description:

Tree-SHA512: 8aaf739ca5eb2cf6f777b69a0d65f391ba311a33d2e23abc4d3008f90c6ef9da79d0683845abfc08978309f43409f0a7021663f8c564e157224c1dbe15138158
2020-01-10 10:33:55 -06:00
Wladimir J. van der Laan
b515e7c120
Merge #11268: [macOS] remove Growl support, remove unused code
f151f5f50 [macOS] remove Growl support, remove unused code (Jonas Schnelli)

Pull request description:

  There is no longer a reason to support Growl.
  A) It went to pay-ware since a couple of years
  B) Since OSX 10.8, the operating system has its own modal notification options (Notification Center).

  This PR removes support for Growl.
  OSX notification centre is still supported after this PR.

Tree-SHA512: eee18098d7354c4e98f927bca9963d4843ff6bceee74795f73a66c27eed33efaac00ec2cabde8807efcbc936b16ab712249006fa13f5a3f55e4d44d163f5f9a0
2020-01-10 10:33:55 -06:00
Wladimir J. van der Laan
75ec11ee93
Merge #10793: Changing &var[0] to var.data()
592404f03 Changing &vec[0] to vec.data(), what 9804 missed (MeshCollider)

Pull request description:

  This just continues the work of https://github.com/bitcoin/bitcoin/pull/9804

  Modifies a lot of `&vector[]`'s to `vector.data()`'s across all the files including tests, just the stuff that 9804 missed

Tree-SHA512: dd1a9dffb999dea4fba78dcc91fe02f90250db86f5c74948e1ff3e8b4036b2154b600555eaa04dece5368920aae3513bc36425dc96e4319ca1041b0928a6b656
2020-01-10 10:33:54 -06:00
Wladimir J. van der Laan
d7a2232103
Merge #10916: add missing lock to crypter GetKeys()
fe09b0197 add missing lock to crypter GetKeys() (Marko Bencun)
5cb3da04b keystore GetKeys(): return result instead of writing to reference (Marko Bencun)

Pull request description:

  Issue: #10905

  First commit makes GetKeys() return the result instead of writing to a reference to remove some useless lines.

Tree-SHA512: bb51255b5a6cf5488c3d5dee89f539d41f0717f018441d120047f877e0a705a133fb3b7a97d1cf8f73b5d2ed93dd2dbdfcd6f394e40105af2a12e01d397cb402
2020-01-10 10:33:54 -06:00
Wladimir J. van der Laan
84e5b323b2
Merge #11232: Ensure that data types are consistent
061297f0a Ensure that data types are consistent (jjz)

Pull request description:

  1. nStatus of CBlockIndex  is consistent with the definition of Enum(BlockStatus)
  2. The BlockHeader is consistent with the type of variable defined in CBlockHeader

Tree-SHA512: 3d4a55c62d3e17b9c83807eae153db4fcfcd8477c9413a45dedfa157563e77b775a66974648d28c9d44ac45a5705eef83b31a8a3b44316dc9814b85526a9d034
2020-01-10 10:33:54 -06:00
Alexander Block
99715f36dd Don't load caches when blocks/chainstate was deleted and also delete old caches (#3280)
* Don't load caches when blocks/chainstate was not present

* Delete old cache files when we decided to not load them

* Make sure cache files are of the exact format we expected them to be, flush empty objects into them instead of deleting files naively

* Streamline logic a bit, rename fIgnoreCacheFiles to fLoadCacheFiles

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-01-10 13:24:21 +03:00
PastaPastaPasta
f4f9f918dc [Pretty Trivial] Adjust some comments (#3252)
* remove extra e

Signed-off-by: Pasta <pasta@dashboost.org>

* scripted-diff: Replace smth with something

-BEGIN VERIFY SCRIPT-
sed -i 's/smth/something/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp
-END VERIFY SCRIPT-
2020-01-08 08:02:49 +01:00
Alexander Block
26fb682e91
Speed up prevector initialization and vector assignment from prevectors (#3274)
* Implement assign_to in prevector

* Implement optimized fill() methods for trivially constructible types in prevector

No need to invoke the "new" operator on every element when the elements
are trivially constructible (e.g. unsigned char)

* Benchmark prevector<...>::const_iterator vs vector.assign()

* Manually invoke ::memmove instead of relying on the stl

Some compilers do not automatically switch to memmove internally, so lets
do this manually.

* Use prevector::assign_to in benchmark

* Rename prevector benchmarks

* Use larger copy ranges in benchmarks

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-01-08 08:02:17 +01:00
UdjinM6
6ac36b8865 Fix log output after backporting 10303 (#3275) 2020-01-08 08:01:53 +01:00
Alexander Block
9c9cac6d67
Show quorum connections in "quorum dkgstatus" and use it in mine_quorum (#3271)
Instead of statically sleeping 2 seconds
2020-01-08 08:01:26 +01:00
Alexander Block
aca6af0a0e
Use smaller LLMQs in regtest (#3269)
* Rename LLMQ_5_60 to LLMQ_TEST

* Introduce -llmqtestparams which allows to modify LLMQ_TEST on regtest

Also add support in DashTestFramework

* Use parameters size=3, threshold=2 as default for LLMQ_TEST

And fall back to the old parameters where necessary

* Wait for all contributions, even when one member is lying

Otherwise we might end up continuing too fast, which would fail the DKG.

* Update src/chainparams.cpp

Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-01-07 13:49:51 +01:00
Alexander Block
c76552b0b5 Drop new connection instead of old one when duplicate MNAUTH is received (#3272) 2020-01-05 00:17:17 +03:00
UdjinM6
4e8b89007c
AppInitMain should quit early and return false if shutdown was requested at some point (#3267)
This fixes crashes e.g. when user decided to shutdown while rescanning the wallet
2020-01-04 14:21:00 +03:00
UdjinM6
4439ce985a
Tweak few more strings re mixing and balances (#3265)
* Tweak few more strings re mixing and balances

* "Fully mixed"/"mixed" -> "PrivateSend"

* Apply suggestions from code review

Co-Authored-By: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2020-01-04 14:20:43 +03:00
UdjinM6
e82dfc4317
Merge pull request #3106 from PastaPastaPasta/backports-0.16-pr1
Backports 0.16 pr1-4: other
2020-01-04 14:20:17 +03:00
UdjinM6
4b7c175f53
Merge pull request #3266 from PastaPastaPasta/backports-0.16-pr1-rpc
Backports 0.16 pr1-3: rpc
2020-01-03 20:49:59 +03:00
Jonas Schnelli
2aa7ca5723
Merge #10770: Drop upgrade-cancel callback registration for a generic "cancelable"
ee4d1493e Drop upgrade-cancel callback registration for a generic "resumeable" (Matt Corallo)

Pull request description:

  Instead of passing a StartShutdown reference all the way up from
  txdb, give ShowProgress a "cancelable" boolean, as StartShutdown
  is pretty much always what you'll want to use to cancel. Use the
  same boolean to allow cancel during initial block verification.

Tree-SHA512: 515817aaa4b9e3e856200e00be9c2d44ecfa2d4f288fe3e02116105fe85de2650c13076ee7e45396ec1ce6ab45e53b0477cddda7cfdee5b3bd0589cb81a4c346
2020-01-03 08:35:55 -06:00
Wladimir J. van der Laan
e4fef1fd33
Merge #10596: Add vConnect to CConnman::Options
352d582ba Add vConnect to CConnman::Options (Marko Bencun)

Pull request description:

  Split the "-connect" argument parsing out of CConnman and put it into
  AppInitMain().

Tree-SHA512: f2d3efc4e2c5808ff98696ea20dd96df599bc472ed5afc9c3eea305d94c36a6ab50c632aa05396c7c34d1917d91b1e7ccd725656ff2631e2a36d9eac477455dc
2020-01-03 08:35:55 -06:00
Wladimir J. van der Laan
742d6e99fa
Merge #10303: [bench] Include ms/blk stats in Connect* benchmarks.
a473eff [bench] Replace 0.00(000)1 with MICRO/MILLI #defines in validation.cpp. (Karl-Johan Alm)
5f850b0 [bench] Include ms/blk stats in Connect* benchmarks. (Karl-Johan Alm)

Pull request description:

  Display the average per block runtime for the various benchmarked times in the block connect functions to give an overview of long(er) term time distribution statistics.

Tree-SHA512: 3d6f24f6b9e3dbb448a647e2cda8e7b90ad6a16d4821f49f426a8e1ebc3ce5a0cf0a8cde82213e293affba441615702dfe50822c8c818e282af03bfe383d83e0

More of 10303
2020-01-03 08:35:55 -06:00
Wladimir J. van der Laan
c15a442663
Merge #10843: Add attribute [[noreturn]] (C++11) to functions that will not return
b82c55a Add attribute [[noreturn]] (C++11) to functions that will not return (practicalswift)

Pull request description:

  Add attribute `[[noreturn]]` (C++11) to functions that will not return.

  Rationale:
  * Reduce the number of false positives/false negatives from static analyzers with regards to things such as unused or unreachable code
  * Potentially enable additional compiler optimizations

Tree-SHA512: 899683fe8b2fcf19bd334352271d368b46b805be9d426aac1808335fd95732d6d7078d3296951b9879196f3f6e3ec0fdb7695d0afdc3fbe4dd78a2ca70e91ff7
Signed-off-by: Pasta <pasta@dashboost.org>

Fixes for bitcoin#10843 backport

10843 continued

Signed-off-by: Pasta <pasta@dashboost.org>
2020-01-03 08:35:55 -06:00
Wladimir J. van der Laan
4a8349e93f
Merge #11039: Avoid second mapWallet lookup
8f2f1e0 wallet: Avoid second mapWallet lookup (João Barbosa)

Pull request description:

  All calls to `mapWallet.count()` have the intent to detect if a `txid` exists and most are followed by a second lookup to retrieve the `CWalletTx`.

  This PR replaces all `mapWallet.count()` calls with `mapWallet.find()` to avoid the second lookup.

Tree-SHA512: 96b7de7f5520ebf789a1aec1949a4e9c74e13683869cee012f717e5be8e51097d068e2347a36e89097c9a89f1ed1a1529db71760dac9b572e36a3e9ac1155f29

More of 11039
2020-01-03 08:35:50 -06:00
Jonas Schnelli
9044d5315b Merge #11156: Fix memory leaks in qt/guiutil.cpp
9b348ff9e Fix memory leaks in qt/guiutil.cpp (Dan Raviv)

Pull request description:

  on macOS:
  `listSnapshot` was leaking in `findStartupItemInList()`
  `bitcoinAppUrl` was leaking in `[Get|Set]StartOnSystemStartup()`

Tree-SHA512: dd49e1166336cf4f20035d21930f2f99f21f1d9f91a1101b1434a23dd0b92d402ac7efb177473c758d8af1dbab8d8750485583231c5b5854203d2493f0b43e73
2020-01-02 22:01:29 -06:00
Jonas Schnelli
1d2cd24824 Merge #10911: [qt] Fix typo and access key in optionsdialog.ui
d2be7b25b Typo in optionsdialog.ui Tooltip displayed ampersand incorrectly, &amp; should be in text. (James Evans)

Pull request description:

  Tooltip displayed ampersand incorrectly, &amp; should be in text property rather than tooltip so that access key is correctly displayed for accessibility.

Tree-SHA512: 331848207317d37d4d9db40119d0b7ae9a276d06cd1b057cd0e87d508e1aa769b785246ca30ca9156db632798ec9f68ba8bf78cf42904267b4187bd27cfced35
2020-01-02 22:01:29 -06:00
Wladimir J. van der Laan
73eac47d3c Merge #10845: Remove unreachable code
41bf1598f Remove unreachable code (practicalswift)

Pull request description:

  Remove unreachable code.

Tree-SHA512: 2ae94035f693b1ac73b1587eafcc646602a185f6d2b8a24a05939b43235b331c9e6f369ad2e8208624a47c920e989413c6a89ab9b608add5b7be4ebefae2a796
2020-01-02 22:01:29 -06:00
MarcoFalke
ce2eeaef5f Merge #10777: [tests] Avoid redundant assignments. Remove unused variables
49eb0916d [tests] Avoid redundant assignments. Remove unused variables. (practicalswift)

Pull request description:

  * Remove unused variables.
  * Avoid redundant assignments.

Tree-SHA512: 74dd59680c785c601982a791648bc5d9b04e2b4509119e05f2e402b94998f5bbcbdea1f82d05e5f431fe06642e8db7c346fa8bc4c11f8cdcc554bc70d735534c
2020-01-02 22:01:29 -06:00
Wladimir J. van der Laan
62b2f3a317 Merge #10809: optim: mark a few classes final
40a0f9f Enable devirtualization opportunities by using the final specifier (C++11) (practicalswift)
9a1675e optim: mark a few classes final (Cory Fields)

Pull request description:

  Using gcc's ```-Wsuggest-final-types``` and lto, I identified a few easy devirtualization wins:

  > wallet/wallet.h:651:7: warning: Declaring type 'struct CWallet' final would enable devirtualization of 26 calls [-Wsuggest-final-types]

  >coins.h:201:7: warning: Declaring type 'struct CCoinsViewCache' final would enable devirtualization of 13 calls [-Wsuggest-final-types]

  >txdb.h:67:7: warning: Declaring type 'struct CCoinsViewDB' final would enable devirtualization of 5 calls [-Wsuggest-final-types]

  >zmq/zmqnotificationinterface.h:16:7: warning: Declaring type 'struct CZMQNotificationInterface' final would enable devirtualization of 4 calls [-Wsuggest-final-types]

  >httpserver.cpp:42:7: warning: Declaring type 'struct HTTPWorkItem' final would enable devirtualization of 2 calls [-Wsuggest-final-types]

Tree-SHA512: 2a825fd27121ccabaacff5cde2fc8a50d1b4cc846374606caa2a71b0cd8fcb0d3c9b5b3fd342d944998610e2168048601278f8a3709cc515191a0bb2d98ba782
2020-01-02 22:01:29 -06:00