13baf72 Replace save|restoreWindowGeometry with Qt functions (MeshCollider)
Pull request description:
Alternative to https://github.com/bitcoin/bitcoin/pull/11208, closes https://github.com/bitcoin/bitcoin/issues/11207
According to the [Qt documentation](https://doc.qt.io/qt-4.8/qwidget.html#restoreGeometry), restoreGeometry does all the checks we need, so it would be better to rely on them instead of doing it ourselves.
~Haven't tested this properly yet, hence the WIP.~
Gives expected behavior exactly as the other system apps do based on my tests. Only potential issue is the case when the GUI is almost entirely offscreen with only a single strip of pixels, its not really possible to see the GUI, but if you know it's there you can bring it back onscreen with just the mouse. And that's exactly how notepad behaves on Windows so I don't think its a real issue.
This also gives much better behavior when closing a maximized window, currently (0.15.0 release) a maximized window will save the window size on close, and then reopen as a not-maximized but still that size, which is really annoying. This reopens as maximized.
Gitian build here: https://bitcoin.jonasschnelli.ch/build/305
Tree-SHA512: a8bde14793b4316192df1fa2eaaeb32b44d5ebc5219c35252379840056cd737a9fd162625fd715987f275fec8375334ec1ec328dbc671563f084c611a938985c
f6ffb14 [test] Add getblockchaininfo functional test (João Barbosa)
fd8f45f [test] Add restart_node to BitcoinTestFramework (João Barbosa)
Pull request description:
Adds functional test for `getblockchaininfo`. Also deals with the fact that `pruneheight` is only in the response when pruning is enabled (related to #11366).
Tree-SHA512: 56cdec0921f572874f2fdded0990d1722d1435c3ff9979e6bff1afdccdca6f8b214dbe8d7490cdac07b5758909db085132d14340de2cce943241f7ebde7e5b6c
204cc98 fix link error (Shooter)
Pull request description:
The `perform-gitian-builds` is not exist,
replace `perform-gitian-builds` with `setup-and-perform-gitian-builds`.
Tree-SHA512: c4f3fb4b6ae502a2e7a6857d3075734d493f549871b80ec00a2733ee689b00f98aa67ce7c3b7facf1ae4949b7845e1e2ef6f727aeca0c88c00b46d77b4d7e570
90ab62c45 [docs] document scripted-diff (John Newbery)
Pull request description:
Document scripted-diffs in developer-notes.md
I sometimes comment on PRs that a scripted-diff would be appropriate, but I don't have any documentation to point to. Fix that.
Tree-SHA512: 7d4a14b9217c812e4c27601e5e6dd8054cf5104cd20ecbe1ec0a84c217cc4b0645b7c0d2e3a89fdd4d059cafbc388acbddba75a430308f8279200b9383e009de
723aa1b qt: Backup former GUI settings on `-resetguisettings` (Wladimir J. van der Laan)
Pull request description:
Writes the GUI settings to `guisettings.bak` in the data directory before wiping them. This can be used to retroactively troubleshoot issues (e.g. #11262) where `-resetguisettings` solves the problem.
(as discussed in yesterday's IRC meeting)
Tree-SHA512: c64f5052d992eb02057ba285435f143c42d0cc456144a4c565e1c87be833737f9df750d0aee10810f85047c820d9b4f9f22fd94a6f09f4b28a9cf41b63a56586
Writes the GUI settings to `guisettings.bak` in the data directory
before wiping them. This can be used to retroactively troubleshoot
issues (e.g. #11262) where `-resetguisettings` solves the problem.
3a131b724 Rename out to m_tx_out in CScriptCheck (Johnson Lau)
e91211878 [Refactor] Combine scriptPubKey and amount as CTxOut in CScriptCheck (Johnson Lau)
Pull request description:
This simplifies CScriptCheck by combining scriptPubKey and amount
Tree-SHA512: 6422363cf5394c6cfefb30c1709db6def63230b809cc7697887e4a2e8c684149208edf91dd139e031b9fe732776b2db59305f77c3cba6f333b11cceb39ef0cc2
22fd04beb Remove nBlockMaxSize from miner opt struct as it is no longer used. (Gregory Maxwell)
Pull request description:
Tree-SHA512: f7a0fa380b4173120f33f96de90581cb57b8bd7af50996f0c726845acff7b92bb1212b924495ef89645624239d2b60d19c1cee2a13139b00e917154a33f7da4c
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
6951a1c Remove extremely outdated share/certs dir (MeshCollider)
Pull request description:
The directory hasn't been touched for 5 years (other than a couple of typo fixes/renaming). The certificates are expired, the build process notes are out of date, especially with the gitian building and everything, Gavin no longer has anything to do with it, etc.
The signing process is all documented (and scripted) elsewhere (e.g. doc/release-process.md and gitian-building.md, contrib/macdeploy and windeploy), this can just be removed
@theuni can confirm if this is okay, we discussed it on IRC for a bit :)
Tree-SHA512: e229785f7514a0f9988105f2ce68531a0a876032983ee5c77f41f1a976b9e732eb63cf2eb1f82841df8f7194940635c5ea5d4f8b30f95e69c763f74d4a3a28b1
In the case of CKey's destructor, it seems to have been an oversight in
f4d1fc259 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.
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
7a1e873 [script] Unit tests for IsMine (Jim Posen)
d7afe2d [script] Unit tests for script/standard functions (Jim Posen)
Pull request description:
Simply adding unit test coverage.
Tree-SHA512: aaf16b1b07b6d43c884a67f4fd5f83c31bf2c560f78798036d7aa37a3efe71a7ca3c82c4b3ba1f3119bcbe3b78013e64bb0020fe57ebc69aea1cb54943881959
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
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
fa65dcd doc: Update release notes for 0.16.0 (MarcoFalke)
fa2c3b6 doc: Bump manpages to 0.15.99 (MarcoFalke)
Pull request description:
This updates the release notes for the breaking changes to `-usehd` option and the `getinfo` rpc.
Also, bumps the manpages to current master.
Tree-SHA512: 55b74375fa680d6043882e3cc37bc655840c9e719d67f60d4d615c10399d570cf6ed4dc338635be80d4044d4ed12cebde1370729ccb6794182e6d9c9910dab04
e53fa4a Remove custom fee radio group (Andrew Chow)
Pull request description:
Removes the extraneous custom fee radio group and its single radio button. The radio button is replaced with a label that has the radio button's text.
Continuation of #11332
Tree-SHA512: b47b675f900ee4e2f4823203a42bb697f707ba67a8504d730c53d4dae511d0ed03226af34efd7ea45570c6111f8b3b6c39ac28f1b5c090de225903442ad4159a
fadf31e wallet: Display non-HD error on first run (MarcoFalke)
Pull request description:
On current master a fresh wallet created with `-usehd=0` is silently created as HD wallet.
An error should be displayed on the first run.
Also, this restores a test that was removed in c22a53cFixes: #11313
Tree-SHA512: 226a4129984324f88a431c7e2726383f6841711f0227d8e9f5b4f89d4bb9f2b8e922e6cf0a6f91d6efa747d139543a236b9f29326fc5d1e5d6f1dea2465d9b85
1817398b3 mininode: add an optimistic write and disable nagle (Cory Fields)
Pull request description:
Disclaimer: I'm not familiar with asyncore, so I'm unclear how safe this is. It works for me (tm).
Because the poll/select loop may pause for 100msec before actually doing a send, and we have no way to force the loop awake, try sending from the calling thread if the queue is empty.
Also, disable nagle as all sends should be either full messages or unfinished sends.
This shaves an average of ~1 minute or so off of my accumulated runtime, and 10-15 seconds off of actual runtime.
Tree-SHA512: 6b61b8058e621dacf0b4dd353c10e3666fbda0691440eb6ebc432491ebada80a781dcd09291bf03e70112a41d3c2a0c91775ed08824b79bf8d0ebed11595c28b
e9e939108 [tests] Check connectivity before sending in assumevalid.py (John Newbery)
Pull request description:
assumevalid.py would try to send over a closed P2P connection in a loop,
hitting the following failure many times:
`TestFramework.mininode (ERROR): Cannot send message. No connection to node!`
The test still passed, but this is a lot of noise in the test log.
Just check that the connection is open before trying to send.
Tree-SHA512: 6faf2ce5717de976fed1b5c863bc8d17e785928690f833d5bf175178f95d39f455635a844fe7e0dfdad83ae779dd45bc6e4ed89a9467d8482c5be73b55095c8d
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
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.
1444c2e Switch memory_cleanse implementation to BoringSSL's to ensure memory clearing even with link-time optimization. (Adam Langley)
Pull request description:
The implementation we currently use from OpenSSL prevents the compiler from optimizing away clensing operations on blocks of memory that are about to be released, but this protection is not extended to link-time optimization. This commit copies the solution cooked up by Google compiler engineers which uses inline assembly directives to instruct the compiler not to optimize out the call under any circumstances. As the code is in-lined, this has the added advantage of removing one more OpenSSL dependency.
Regarding license compatibility, Google's contributions to BoringSSL library, including this code, is made available under the ISC license, which is MIT compatible.
BoringSSL git commit: ad1907fe73334d6c696c8539646c21b11178f20f
Tree-SHA512: 8134998663c1501e3ce48fbbd6ab41de981f0855e3f4d25d2e86ff8056c917d82c751c88e9c39660319ebfbc8283dce594c3e4fc7f87080a212a2cdba57ea511
assumevalid.py would try to send over a closed P2P connection in a loop,
hitting the following failure many times:
TestFramework.mininode (ERROR): Cannot send message. No connection to node!
The test still passes, but this is a lot of noise in the test log.
Just check that the connection is open before trying to send.
- 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.
cdaf3a1 Fix Qt 0.14.2->0.15.0 segfault if "total at least" is selected (Matt Corallo)
Pull request description:
`QButtonGroup->button()` may return a nullptr.
Accessing the object directly with `setChecked` seems fragile.
This is a simple fix to ensure to never call a button out of bounds (nullptr).
There are probably other places where a sanity check for `QSettings` are required.
Found by @achow101.
Code by @TheBlueMatt.
Tree-SHA512: a1b5d6636382a4e20c4e66ef82de19e6daa8b1b5f21b0f2bc5f51cfb6b37797045c7e29ebead8088ee2b990ed12c549c217cae6aad7566319599d086d526f6dc
77939f27f Fix uninitialized g_connman crash in Shutdown() (MeshCollider)
Pull request description:
Fixes https://github.com/bitcoin/bitcoin/issues/11312
As @dooglus pointed out, `g_connman` is uninitialized when an invalid wallet path is passed on start up, but then dereferenced in `Shutdown()`, so this tiny PR just fixes that.
Tree-SHA512: 2557133422a6e393017081450a7e6c100fe7d9ce36e628e5f5f479bc07617a7bd9a9ad4d44c0d8abadf2e3eb62a11ce9743abc27b4ae8c20f709e72df4f25a7f
Lint checks should not test these, they are historical documents,
and we don't want to encourage silly changes to them to satisfy
a checker.
Hopefully makes travis pass again on master.
Tree-SHA512: 37e6716c4fd5e8a4e579f9b84042e6b0ac224836b6c851cd1ca3f7d46611ffd3003bed0ae08dd0457f69d6eaa485a0d21c631e7ef16b14bdb0f2f78ea700332d
1f379b1f0 Add tab char lint check and exclude imported dependencies (MeshCollider)
dd365612f Add a lint check for trailing whitespace. (Evan Klitzke)
Pull request description:
This is a new attempt at #11005
Addressed nits, excluded imported dependencies, squashed the original commits, and added a test for tab characters in the *.cpp *.h *.md *.py *.sh files too as per @practicalswift suggestion
Tree-SHA512: d2dfbedc8469026f39b0c63d9a71d8b8e2ed3815d69fecaabad10304d977d6345728c4c865ec7600ed539b1f7cabaa826b50312f4d2eef0a1583d4ff9024c36d
This adds a new CHECK_DOC check that looks for newly introduced trailing
whitespace. Existing trailing whitespace (of which there is plenty!)
will not trigger an error.
This is written in a generic way so that new lint-*.sh scripts can be
added to contrib/devtools/, as I'd like to contribute additional lint
checks in the future.
77aa9e59e test: Check RPC argument mapping (Wladimir J. van der Laan)
Pull request description:
Parse the dispatch tables from the server implementation files, and the conversion table from the client (see #10751).
Perform the following consistency checks:
- Arguments defined in conversion table, must be present in dispatch table. If not, it was probably forgotten to add them to the dispatch table, and they will not work.
- Arguments defined in conversion table must have the same names as in the dispatch table. If not, they will not work.
- All aliases for an argument must either be present in the conversion table, or not. Anything in between means an oversight and some aliases won't work.
Any of these results in an error.
It also performs a consistency check to see if the same named argument is sometimes converted, and sometimes not. E.g. one RPC call might have a 'verbose' argument that is converted,
another RPC call might have one that is not converted. This is not necessarily wrong, but points at a possible error (as well as makes the API harder to memorize) - so it is emitted as a warning (could upgrade this to error).
This test is added to travis and run when `CHECK_DOC`. Currently fails with the following output:
```
* Checking consistency between dispatch tables and vRPCConvertParams
ERROR: createrawtransaction argument 3 (named optintorbf in vRPCConvertParams) is not defined in dispatch table
ERROR: getblock argument ['verbosity', 'verbose'] has conflicts in vRPCConvertParams conversion specifier [True, False]
WARNING: conversion mismatch for argument named verbose ([('getblock', False), ('getblockheader', True), ('getmempoolancestors', True), ('getmempooldescendants', True), ('getrawmempool', True), ('getrawtransaction', True)])
```
- ~#10698 fixes the first ERROR~
- #10747 fixes the second ERROR, as well as the WARNING
Update: #10698 was merged, leaving:
```
* Checking consistency between dispatch tables and vRPCConvertParams
ERROR: getblock argument ['verbosity', 'verbose'] has conflicts in vRPCConvertParams conversion specifier [True, False]
WARNING: conversion mismatch for argument named verbose ([('getblock', False), ('getblockheader', True), ('getmempoolancestors', True), ('getmempooldescendants', True), ('getrawmempool', True), ('getrawtransaction', True)])
```
Tree-SHA512: feabebfbeda5d4613b2b9d5265aa6bde4e1a0235297ffd48fa415ad7edc531d9ed7913fe76d191ac60d481a915a326f216bc93de3c671e45e1d14e97d07dea7a