Commit Graph

18199 Commits

Author SHA1 Message Date
PastaPastaPasta
d5c595352a
More pruning improvements (#3579)
* explicitly check that -disablegovernance is true for pruned mode.

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

* try to set -disablegovernance and -txindex if pruned mode is enabled

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

* Adjust InitWarning when governance validation is disabled

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

* Check for deprecated -litemode earlier

* Move -disablegovernance warning into AppInitParameterInteraction

* Tweak -prune help text and a related comment in AppInitParameterInteraction

* Ignore init warnings in blockchain.py

* Adjust "governance validation disabled" warning depending on if running a pruned node

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* Skip init warnings in import-rescan.py and node_network_limited.py

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-07-09 02:28:30 +03:00
dustinface
d4c6ef30b9
qt: Disable macOS system focus rectangles for dash themes (#3556)
* qt: Disable macOS system focus rectangles for dash themes

The focus rects drawn by macOS are in the color the user selected in the
OS settings as selection color. This just doesn't always fit into the coloring of the dash specific themes.

* Apply review suggestion

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-07-09 02:27:53 +03:00
PastaPastaPasta
95f83945b9
remove extra space at end line
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-07-08 19:16:32 +00:00
PastaPastaPasta
fafa767e57
Merge #13564: [wallet] loadwallet shouldn't create new wallets. (#3592)
ea65182f03 [wallet] loadwallet shouldn't create new wallets. (John Newbery)

Pull request description:

  A bug in the initial implementation of loadwallet meant that if the
  arguement was a directory that didn't contain a wallet.dat file, a new
  wallet would be created in that directory. Fix that so that if a
  directory is passed in, it must contain a wallet.dat file.

  Bug reported by promag (João Barbosa).

Tree-SHA512: 0a59fa8a33fde51a88544ad288b00e4995284fe16424f643076aaba42b8244fff362145217650ee53d518dfab7efbed4237632c34cdd3dcbbecaa9ecaab5fd7b

Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2020-07-08 15:55:33 +03:00
UdjinM6
0891d75340
Prefer creating larger denoms at the second step of CreateDenominated (#3589)
This also means less smaller denoms (which could be good for privacy) and fixes a bug (not mixing all the available funds), see comments in code for more info.
2020-07-08 15:55:08 +03:00
pasta
e6a1c6b5bb scripted-diff: change all tabs to spaces in linearize-hashes.py and linearize-data.py
It appears bitcoin has already done this previously(seemingly forever), however, we for some reason have tabs. This was causing the linter to fail because a backport touched lines which resulted in linter yelling at me for adding lines beginning with tabs. To fix this, replacing all tabs with spaces in these two files.

-BEGIN VERIFY SCRIPT-
sed -i 's/\t/    /g' contrib/linearize/linearize-*.py
-END VERIFY SCRIPT-

Signed-off-by: pasta <pasta@dashboost.org>
2020-07-07 16:03:07 -05:00
UdjinM6
dc66c13863
More accurate fee calculation in CreateDenominated (#3588)
* More accurate fee calculation in CreateDenominated

* Apply suggestions from code review

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

* Fix `finished` conditions

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2020-07-07 20:31:33 +03:00
UdjinM6
ab9a8eed37
Merge pull request #3555 from xdustinface/pr-ui-2-fonts
qt: Implement application wide font management
2020-07-07 20:30:54 +03:00
MarcoFalke
38f90834cc Merge #13488: Docs: Improve readability of "Squashing commits"
42c499614a Docs: Improve readability of "Squashing commits" (wodry)

Pull request description:

  It was not easy to read the comment lines for me because I was not sure whether the sentence ended with the line or not ("pull set commits"?).
  Therefore, dots had been invented and I have added them to signal the end of a sentence. Also begin New sentence with a capital letter.

  I guess, not all 'pick' words should be replaced by 'squash'? At least I found [this DO](https://www.digitalocean.com/community/tutorials/how-to-rebase-and-update-a-pull-request) rebase/squash documentation helpful, where is written that the first line should not be changed.

Tree-SHA512: 1cb6d866a7295d44e2c8a7911f8a2650eb2f0ba0cffe2b97e90f7e1ed36ac942480b45ef46e01dd3871beb20d04840fb5093fdb414b60f6cc4f88f95fe70f47b
2020-07-07 11:51:06 -05:00
Wladimir J. van der Laan
d1200755f1 Merge #13448: Add linter: Make sure we explicitly open all text files using UTF-8 encoding in Python
c8176b3cc7556d7bcec39a55ae4d6ba16453baaa Add linter: Make sure we explicitly open all text files using UTF-8 or ASCII encoding in Python (practicalswift)
634bd970013eca90f4b4c1f9044eec8c97ba62c2 Explicitly specify encoding when opening text files in Python code (practicalswift)

Pull request description:

  Add linter: Make sure we explicitly open all text files using UTF-8 encoding in Python.

  As requested by @laanwj in #13440.

Tree-SHA512: 1651c00fe220ceb273324abd6703aee504029b96c7ef0e3029145901762c733c9b9d24927da281394fd4681a5bff774336c04eed01fafea997bb32192c334c06
Signed-off-by: pasta <pasta@dashboost.org>

# Conflicts:
#	contrib/devtools/circular-dependencies.py
#	contrib/linearize/linearize-data.py
#	contrib/linearize/linearize-hashes.py
#	contrib/seeds/generate-seeds.py
#	contrib/verify-commits/verify-commits.py
#	test/functional/multiwallet.py
#	test/functional/notifications.py
#	test/functional/test_runner.py
#	test/util/rpcauth-test.py
2020-07-07 11:50:56 -05:00
Wladimir J. van der Laan
3979f24d3f Merge #13479: contrib: Fix CVE-2018-12356 by hardening the regex
9e2e5626dabb7208dafedcc9904940b666be1c3b Fix CVE-2018-12356 by hardening the regex. (Loganaden Velvindron)

Pull request description:

  Detailed write-up here:
  https://neopg.io/blog/pass-signature-spoof/

Tree-SHA512: 2020474ff4c7b5e7f1bea932c63da62aca48d3dc6dcd04507afefad6c40f2977ed2d2916defe2e8e7936a2d498125c578077870147954a7af9b29b823cbb0b10
2020-07-07 11:48:28 -05:00
MarcoFalke
965d601285 Merge #13465: Avoid concurrency issue when make multiple target
cf01fd6f9c Avoid concurrency issue (Chun Kuan Lee)

Pull request description:

  From #13406, changed travis job target for Mac to `all deploy`, but this could cause a race condition.
  Simply add `.NOTPARALLEL` to avoid it.
  Related jobs:
  https://travis-ci.org/bitcoin/bitcoin/jobs/391863281
  https://travis-ci.org/bitcoin/bitcoin/jobs/391907335
  Close #13469

Tree-SHA512: 75c6585fe770dc70e6256dcdf97af37274f95a9240ed5a5cea2ca92b8411893b80327335587270351b128f56cb2e00f684db7c19b1602048132b734dad6ececa
2020-07-07 11:48:18 -05:00
pasta
371e213067 scripted-diff: Avoid temporary copies when looping over std::map (Merge #13241)
The ::value_type of the std::map/std::multimap/std::unordered_map containers is
std::pair<const Key, T>. Dropping the const results in an unnecessary copy,
for example in C++11 range-based loops.

For this I started with a more general scripted diff, then narrowed it down
based on the inspection showing that all actual map/multimap/unordered_map
variables used in loops start with m or have map in the name.

-BEGIN VERIFY SCRIPT-
sed -i -E 's/for \(([^<]*)std::pair<([^c])(.+) : m/for (\1std::pair<const \2\3 : m/' src/*.cpp src/**/*.cpp
sed -i -E 's/for \(([^<]*)std::pair<([^c])(.+) : (.*)map/for (\1std::pair<const \2\3 : \4map/' src/*.cpp src/**/*.cpp
-END VERIFY SCRIPT-

Signed-off-by: pasta <pasta@dashboost.org>
2020-07-07 11:46:21 -05:00
MarcoFalke
ae16904b51 Merge #13402: Document validationinterace callback blocking deadlock potential.
25bc9615b7 Document validationinterace callback blocking deadlock potential. (Matt Corallo)

Pull request description:

  From the branches-I've-had-lying-around-and-forgot-to-PR department...

  This is a comment-only PR, but the comments point out an API quirk that isn't exactly trivial. None of our use-cases right now hit this, but if we were to call SyncWithValidationInterfaceQueue (eg to limit queue depth) in ATMP, I'm pretty sure we'd hit a deadlock there.

Tree-SHA512: 889dd8fc9eb15d1f2aa5ca467e783bc8f07bc543b166b032741795b0db7a0df11a2846d3cb7c69bafa8d1acf970021001b742f52be06725a932813230c5b4a7b
2020-07-07 11:41:10 -05:00
MarcoFalke
fa3eed7af9 Merge #13450: Add linter: Enforce the source code file naming convention described in the developer notes
ad691f666b Add linter: Enforce the source code file naming convention described in the developer notes (practicalswift)

Pull request description:

  Add linter: Enforce the source code file naming convention described in the developer notes.

Tree-SHA512: 6458acf5383de7e81554bdd954c3a74c2bbf26286687ea69d934f11174d2f6bd573e8d2c16a7e77bbd12065e65be7700ecd7791d215f286e18f346bf964cd17d
2020-07-07 11:39:49 -05:00
MarcoFalke
1c002dd1b6 Merge #13422: Drop ParseHashUV in favor of calling ParseHashStr
abd2678ac1 Drop ParseHashUV in favor of calling ParseHashStr (Ben Woosley)

Pull request description:

  The one existing call already validates `get_str` will pass via `checkObject`:
  https://github.com/bitcoin/bitcoin/pull/13422/files#diff-8fe4d6985ee4acf8bfc1ed8db1e83cb5L586

  Split from #13420

Tree-SHA512: 35dfa8c28d0c3ceac7a6de7f4eb4a44d912f4c31f5d21c9438f899566ca2b34851f1a58c3417355e55d0c33abb97385f4a47e034bfc8e3cdbbf5f73813ca0582
2020-07-07 11:39:35 -05:00
MarcoFalke
35c791c37d Merge #13406: travis: Change Mac goal to all deploy
3d69853090 travis: Change Mac goal to all deploy so that travis can build all executables for Mac. (Chun Kuan Lee)

Pull request description:

  Currently, travis only build bitcoin-qt for Mac with make deploy, so  I think that we can add a make step to build cli, daemon, test and bench executables.

Tree-SHA512: 346c207836ee7313a57e0cd03367ada7e95c182d0f58b06c4ee5b8f2865ba4ee077b030a5494b58a808c015afe0569fa3252d0a5a687c47b7094dc77599ce50e
Signed-off-by: pasta <pasta@dashboost.org>

# Conflicts:
#	.travis.yml
2020-07-07 11:37:31 -05:00
MarcoFalke
c14b2e9ef3 Merge #13350: [tests] Add logging to provide anchor points when debugging p2p_sendheaders
2ce81867b2 [tests] Add logging to provide anchor points when debugging failures. (Lowell Manners)

Pull request description:

  refs #12453

Tree-SHA512: 0ad432bd848723a5b813df4d35fcd8c81d152f042499c8340a9a2a9b7918d6e785efbf9f07b63b6c0253a949044cebdb51802971c09fb8dde0efa5169f34ef20
Signed-off-by: pasta <pasta@dashboost.org>

# Conflicts:
#	test/functional/sendheaders.py
2020-07-07 11:34:46 -05:00
Wladimir J. van der Laan
8a78e4f152 Merge #13435: When build fails due to lib missing, indicate which one
51cd508e2fb429f7c23a0bbbf4b8687386276105 When build fails due to lib missing, indicate which one (Ben Woosley)

Pull request description:

  A failure of "lib missing" has limited utility.

Tree-SHA512: de77c077ea223bb862a6261fd99e9ddc533e28ed42837ac4262a1c0f24d73add4d2baae6be5cb5ef2012be32bcc3ae587dbc1eab0c42b633bea8eec64b18a249
2020-07-07 11:31:54 -05:00
Wladimir J. van der Laan
eea8da81c5 Merge #13428: validation: check the specified number of blocks (off-by-one)
f6f8026e40326e74293dc8ecc270a7e3b4850727 validation: check the specified number of blocks (off-by-one) (Karl-Johan Alm)

Pull request description:

  ```
  echeveria | 2018-06-11 02:03:03.384975 Verifying last 3 blocks at level 3
  echeveria | 2018-06-11 02:03:23.676793 No coin database inconsistencies in last 4 blocks (6564 transactions)
  echeveria | off by one?
  sipa      | echeveria: possibly!
  kallewoof | Looks like it checks one more block than suggested. `if (pindex->nHeight < chainActive.Height()-nCheckDepth) break;` should probably be `<=`.
  sipa      | kallewoof: agree
  ```

  Post-commit:
  ```
  2018-06-11T05:24:02Z Verifying last 6 blocks at level 3
  2018-06-11T05:24:02Z [0%]...[16%]...[33%]...[50%]...[66%]...[83%]...[99%]...[DONE].
  2018-06-11T05:25:07Z No coin database inconsistencies in last 6 blocks (7258 transactions)
  ```

  Pre-commit:
  ```
  2018-06-11T05:27:11Z Verifying last 6 blocks at level 3
  2018-06-11T05:27:11Z [0%]...[16%]...[33%]...[50%]...[66%]...[83%]...[99%]...[DONE].
  2018-06-11T05:27:12Z No coin database inconsistencies in last 7 blocks (9832 transactions)
  ```

Tree-SHA512: 6e68dc4ba74232518c2ba8ea624d65893534f3619d43ccdf0b9c65992f25b68cb52cf54fa35e6e3d092d1eee5c9a8887057828895f1acdafc0ebb48f683fffdc
2020-07-07 11:31:16 -05:00
Wladimir J. van der Laan
442e54e851 Merge #13440: qa: Log as utf-8
fa8071a0985700a4641ce77dac2cb2fa285d3afe qa: Log as utf-8 (MarcoFalke)

Pull request description:

  Explicitly read and write the log files with utf-8 as encoding

Tree-SHA512: ca28f37f34a09845c736ff6c4c21733c3c39584f52c81e48ff25e5e35979c317d0989862b2b93acc7e359fbcc20b99533365455830b2ddb41eb4d8c17314534e
2020-07-07 11:29:31 -05:00
pasta
8a86c23e96 continued 13312
Signed-off-by: pasta <pasta@dashboost.org>
2020-07-07 11:27:55 -05:00
MarcoFalke
f77b58e89f Merge #13312: docs: Add a note about the source code filename naming convention
e56771365b Do not use uppercase characters in source code filenames (practicalswift)
419a1983ca docs: Add a note about the source code filename naming convention (practicalswift)

Pull request description:

  Add a note about the source code filename naming convention.

Tree-SHA512: 8d329bd9e19bcd26e74b0862fb0bc2369b46095dbd3e69d34859908632763abd7c3d00ccc44ee059772ad4bae4460c2bcc1c0e22fd9d8876d57e5fcd346cea4b
2020-07-07 11:17:45 -05:00
UdjinM6
4a270bcecb
Merge pull request #3584 from PastaPastaPasta/backports-0.17-pr9
Backports 0.17 pr9
2020-07-07 09:35:28 +03:00
UdjinM6
497c3fbc85
Add missing locks after backporting 12333 (#3587) 2020-07-07 09:06:59 +03:00
xdustinface
172c2837e4 qt: Make font related variables private in GUIUtil's namespace 2020-07-06 23:28:30 +02:00
xdustinface
6e36764bba qt: Add -font-family command line parameter
Allows to choose between the fonts:

0 - SystemDefault (default)
1 - Montserrat
2020-07-06 23:24:35 +02:00
xdustinface
175c3e0974 qt: Introduce GUIUtil::FontFamily and make font family adjustable 2020-07-06 23:24:35 +02:00
xdustinface
85c353e670 qt: Introduce GUIUtil::FontWeight as mapper for QFont::Weight 2020-07-06 23:24:35 +02:00
xdustinface
687a0e67ac qt: Move font-size settings from css to c++.
This also keeps track of changed font-sizes and updates them depending on the settings if GUIUtil::updateFonts() gets called.
2020-07-06 23:24:35 +02:00
xdustinface
c0056c5f3f qt: Keep track of font updates 2020-07-06 23:24:35 +02:00
xdustinface
19a93e9a06 qt: Add -font-weight-normal, -font-weight-bold and -font-scale arguments
-font-weight-normal allows to set the weight of normal texts in the UI
-font-weight-bold allows to set the weight of bold texts in the UI
-font-scale allows to scale the application font size up/down
2020-07-06 23:24:35 +02:00
xdustinface
2c7f8db634 qt: Use default font in receive requests and transaction description 2020-07-06 23:24:35 +02:00
xdustinface
2bbc6b8464 qt: Load custom font in splashscreen 2020-07-06 23:24:35 +02:00
xdustinface
68a3250003 qt: Use correct default font for size calculations 2020-07-06 23:24:35 +02:00
xdustinface
f94dfbebc5 qt: Set a proper font weight with GUIUtil::setFont where requried
The two parent commits did remove all some font-weight changes from css and ui files. This commit reverts them.
2020-07-06 23:24:35 +02:00
xdustinface
27bede7c79 qt: Removed all font related changes from .ui/.css files
This is because font related changes will from now on only be made either in c++ with `GUIUtil::setFont` for font weight/style changes or in css for size and color changes with `font-size` or `color`.
2020-07-06 23:23:39 +02:00
xdustinface
3f8023311b qt: Use default montserrat instead of fixed pitch font in dash themes 2020-07-06 23:18:37 +02:00
xdustinface
787740c0b2 qt: Add Montserrat (picked in Dash Style Guide) as application font
Includes the following methods
 - GUIUtil::loadFonts to load the fonts into the application's font
database
 - GUIUtil::setApplicationFont to set the application font depending on
the active theme
 - GUIUtil::setFont to set a specific font variation for a vector of widgets (Montserrat for dash themes, system default for traditional theme).
 - GUIUtil::getFont to get a specific montserrat variation as QFont (Montserrat for dash themes, system default for traditional theme).
 - GUIUtil::getFontWeightNormal to get the font weight to be used for normal text
 - GUIUtil::getFontWeightBold to get the font weight to be used for
bolder text
 - GUIUtil::getFontNormal to get the default normal weighted QFont
 - GUIUtil::getFontBold to get the default bold weighted QFont

There is a Qt bug on macOS (at least with macOS 10.15.4 and Qt 5.7.1)
which leads to not mapping the font weights correctly to the different
font types so that they can be selected by the appropriate methods to
set the font weight. As result there is now way to properly select the
different font styles from stylesheet or with QFont::setWeight() for the
font Montserrat. There are only two different weights selectable over
the full range of possible weight values. One very bold one and the
"ExtraLight" version. As workaround its possible to select the fonts by
using the font style string (QFont::setStyleName) as the Montserrat font becomes loaded as one
family with one "font style" for each font file. The font wrapper added
by this commit are taking care of this behaviour for all operating
systems so there should be no other usage of QFont outside of GUIUtil and no more font changes in stylesheets.
2020-07-06 23:18:33 +02:00
Wladimir J. van der Laan
6e5b3f3b9e Merge #13230: Simplify include analysis by enforcing the developer guide's include syntax
16e3cd380af570fb2f656e0344bab88829a4bcda Clarify include recommendation (practicalswift)
6d10f43738d58bf623975e3124fd5735aac7d3e1 Enforce the use of bracket syntax includes ("#include <foo.h>") (practicalswift)
906bee8e5f474f8718d02e6f1938f20dcfe3d2cc Use bracket syntax includes ("#include <foo.h>") (practicalswift)

Pull request description:

  When analysing includes in the project it is often assumed that the preferred bracket include syntax (`#include <foo.h>`) mentioned in `developer-docs.md` is used consistently. @sipa:s excellent circular dependencies script [`circular-dependencies.py`](50c69b7801/contrib/devtools/circular-dependencies.py) (#13228) is an example of a script making this reasonable assumption.

  This PR enables automatic Travis checking of the include syntax making sure that the bracket syntax includes (`#include <foo.h>`) is used consistently.

Tree-SHA512: a414921aabe8e487ebed42f3f1cbd02fecd1add385065c1f2244cd602c31889e61fea5a801507ec501ef9bd309b05d3c999f915cec1c2b44f085bb0d2835c182
Signed-off-by: pasta <pasta@dashboost.org>
2020-07-01 20:12:03 -05:00
Wladimir J. van der Laan
000b2794a5 Merge #13259: refactoring: add a method for determining if a block is pruned or not
e9a1881b90704c6708cfba79d2208debbd4476d0 refactor: add a function for determining if a block is pruned or not (Karl-Johan Alm)

Pull request description:

  The check for whether a block is pruned or not is sufficiently obscure that it deserves a macro. It is also used in 2 places, ~~with more coming, e.g. #10757~~ (turns out it was a move, not an addition).

Tree-SHA512: b9aeb60663e1d1196df5371d5aa00b32ff5d4cdea6a77e4b566f28115cce09570c18e45e4b81a4033f67c4135c8e32c027f67bae3b75c2ea4564285578a3f4dd
2020-07-01 20:12:03 -05:00
Wladimir J. van der Laan
28b02f42e1 Merge #13041: build: Add linter checking for accidental introduction of locale dependence
698cfd081144845f6246171b8a2a0cfa8daaecdb docs: Mention lint-locale-dependence.sh in developer-notes.md (practicalswift)
0a4ea2f4589961868ab4d25e0277485c31938e20 build: Add linter for checking accidental locale dependence (practicalswift)

Pull request description:

  This linter will check for code accidentally introducing locale dependencies.

  Unnecessary locale dependence can cause bugs that are very tricky to isolate and fix. We should avoid using locale dependent functions if possible.

  Context: https://github.com/bitcoin/bitcoin/pull/12881#issuecomment-378564722

  Example output:

  ```
  $ contrib/devtools/lint-locale-dependence.sh
  The locale dependent function tolower(...) appears to be used:
  src/init.cpp:    if (s[0] == '0' && std::tolower(s[1]) == 'x') {

  Unnecessary locale dependence can cause bugs that are very
  tricky to isolate and fix. Please avoid using locale dependent
  functions if possible.

  Advice not applicable in this specific case? Add an exception
  by updating the ignore list in contrib/devtools/lint-locale-dependence.sh
  ```

  **Note to reviewers:** What is the most appropriate `LOCALE_DEPENDENT_FUNCTIONS` function list? What should be added or removed?

Tree-SHA512: 14e448828804bb02bf59070647e38b52fce120c700c903a4a8472769a2cee5dd529bd3fc182386993cb8720482cf4250b63a0a477db61b941ae4babe5c65025f
2020-07-01 20:12:03 -05:00
Wladimir J. van der Laan
43e187ea3f Merge #13288: rpc: Remove the need to include rpc/blockchain.cpp in order to put GetDifficulty under test
ebec7317ca1acbc65afa7fb08fc219c315fc4527 Drop the chain argument to GetDifficulty (Ben Woosley)

Pull request description:

  By dropping the chain argument to `GetDifficulty`. `GetDifficulty` was called in two ways:
  * with a guaranteed non-null blockindex
  * with no argument

  Change the latter case to be provided `chainActive.Tip()` explicitly.

  Introduced in: #11748

Tree-SHA512: f2c97014be185f3e3de92db15848548650e4a67fab20a41bcfa851c5c63c245915cbe9380f84d9da2081e8756d31a41de417db1d35cfecf41ddb4f25070eb525
2020-07-01 20:12:03 -05:00
MarcoFalke
72b69a35a3 Merge #13301: lint: Add linter to error on #include <*.cpp>
9d6c9dbb88 lint: Add linter to error on #include <*.cpp> (Ben Woosley)

Pull request description:

  Files should depend on one another by interface, not by implementation.
  This checks for quoted includes as well.

Tree-SHA512: d36d468f48d538077f5f927b9561729fd7d76319f6b2e2cc10414a9f243588194e90ca1d85eca65019f9259268f555d25106eaaa56da28c58fa8d5837b469661
2020-07-01 20:12:03 -05:00
pasta
02085df48b Adjust current boost includes present
Signed-off-by: pasta <pasta@dashboost.org>
2020-07-01 20:12:03 -05:00
Wladimir J. van der Laan
9a9aa3f467 Merge #13385: build: Guard against accidental introduction of new Boost dependencies
81bbd32a2c755482c6e8ef049a59de672715b545 build: Guard against accidental introduction of new Boost dependencies (practicalswift)

Pull request description:

  Guard against accidental introduction of new Boost dependencies.

  Context: #13383 – the usage of `boost::lexical_cast` was introduced in #11517 from December 2017

Tree-SHA512: 8d7b667ecf7ea62d84d9d41a71726f1e46c5a411b5a7db475c973ef364cac65609399afda7931e143a27d40c2947ff286e5e98ab263e8f0d225e2ae2c0872935
2020-07-01 20:12:03 -05:00
pasta
9d26ad6d8f remove duplicate includes so that ./contrib/devtools/lint-includes.sh is clean
Signed-off-by: pasta <pasta@dashboost.org>
2020-07-01 20:12:03 -05:00
MarcoFalke
005d241fea Merge #11878: Add Travis check for duplicate includes
c36b720d00 Add Travis check for duplicate includes (practicalswift)
280023f31d Remove duplicate includes (practicalswift)

Pull request description:

  This enforces parts of the project header include guidelines (added by @sipa in #10575).

  Example run:

  ```
  $ git diff
  diff --git a/src/warnings.cpp b/src/warnings.cpp
  index c52a1fd..d8994dd 100644
  --- a/src/warnings.cpp
  +++ b/src/warnings.cpp
  @@ -5,6 +5,8 @@

   #include <sync.h>
   #include <clientversion.h>
  +#include <string>
   #include <util.h>
   #include <warnings.h>
  +#include <util.h>

  diff --git a/src/warnings.h b/src/warnings.h
  index e8e982c..8d2252e 100644
  --- a/src/warnings.h
  +++ b/src/warnings.h
  @@ -7,6 +7,7 @@
   #define BITCOIN_WARNINGS_H

   #include <stdlib.h>
   #include <string>
  +#include <stdlib.h>

   void SetMiscWarning(const std::string& strWarning);
  $ contrib/devtools/lint-includes.sh
  Duplicate include(s) in src/warnings.h:
  #include <stdlib.h>

  Include(s) from src/warnings.h duplicated in src/warnings.cpp:
  #include <string>

  Duplicate include(s) in src/warnings.cpp:
  #include <util.h>
  $ echo $?
  1
  $ git checkout .
  $ contrib/devtools/lint-includes.sh
  $ echo $?
  0
  ```

Tree-SHA512: f653d23c58ebc024dfc5b1fb8570698fd3c515c75b60b5cabbc43595548c488fca92349fa4c8b64460edbe61c879ff1d24f37f959e18552e202a7342460ddbf1
2020-07-01 20:12:03 -05:00
UdjinM6
c59dafb708
Merge pull request #3540 from PastaPastaPasta/backports-0.17-pr8
Backports 0.17 pr8
2020-07-02 04:07:45 +03:00
Wladimir J. van der Laan
a1c9327e0b Merge #13300: qa: Initialize lockstack to prevent null pointer deref
fa9da85b7cc759d06bc24854be2bad0ea87b6006 qa: Initialize lockstack to prevent null pointer deref (MarcoFalke)

Pull request description:

  It is currently impossible to call debug methods such as `AssertLock(Not)Held` on a thread without running into undefined behavior, unless a lock was pushed on the stack in this thread.

  Initializing the global `lockstack` seems to fix both issues.

Tree-SHA512: 8cb76b22cb31887ddf15742fdc790f01e8f04ed837367d0fd4996535748d124342e8bfde68952b903847b96ad33406c64907a53ebab9646f78d97fa4365c3061
2020-07-01 14:08:47 -05:00