Commit Graph

20923 Commits

Author SHA1 Message Date
PastaPastaPasta
b944c04a41
refactor: refactor and improve platformUser restrictions, add some documentation (#4490)
* refactor: refactor and improve platformUser restrictions, add some documentation

* refactor: use a lambda to slightly improve readability
2021-10-11 00:41:39 +03:00
UdjinM6
77b2cfc374
ci/lint: Fix lint-shell.sh in CI (#4489)
* lint: Skip shell linting if gawk is not installed

* lint: Skip Gitian descriptor scripts checking if jq is not installed

* ci: Install gawk and jq

`yq` requires `jq`

* Fix shellcheck warnings
2021-10-11 00:41:20 +03:00
UdjinM6
35ed2b08c1
Merge pull request #4486 from Munkybooty/appveyor-backports-v0.18
Appveyor Backports v0.18
2021-10-10 22:11:56 +03:00
UdjinM6
fc6d76dae8
Merge pull request #4480 from kittywhiskers/llmqrefac
refactor: remove redundant filename prefixes in llmq source filenames, move params
2021-10-10 21:59:13 +03:00
UdjinM6
e81e1a570f
Merge pull request #4448 from vijaydasmp/backport_v18_vijay_batch4_2
Merge (Partial) bitcoin#14822,  bitcoin#14903, bitcoin#12246, bitcoin#14008
2021-10-10 21:48:29 +03:00
Kittywhiskers Van Gogh
9747f12401 docs: elaborate llmq parameter uses, tidy up 2021-10-09 22:28:13 +05:30
Kittywhiskers Van Gogh
af7cae777b move-only: move llmq parameters to their own file 2021-10-09 22:28:13 +05:30
MarcoFalke
500dfdb31a
partial Merge #14822: bench: Destroy wallet txs instead of leaking their memory
fa5cef0f78 bench: Destroy wallet txs instead of leaking their memory (MarcoFalke)

Pull request description:

  This should destroy the wallet txs when the benchmark ends to avoid having to hold them when the following benchmarks run.

Tree-SHA512: e2510946e6a47fad3ec5fb28d298df8ddc2e017455fcff777fa7bbc12d801c08739db6a7a7289509aaa881ccdc59dfff9bcb6772b48db2c457d3787081a46c06
2021-10-08 19:13:56 +05:30
Wladimir J. van der Laan
2833db6e0b
Merge #14008: Preserve a format of RPC command definitions
d9d79576f423cd9c5cef4547c7e3648dbb339460 Preserve a format of RPC command definitions (Kostiantyn Stepaniuk)

Pull request description:

  Currently, RPC commands are formatted in a way that it's easy to read
  and that `test/lint/check-rpc-mappings.py` can parse it.

  To void breaking `test/lint/check-rpc-mappings.py` script by running
  `clang-format`, RPC command definitions should be disabled for clang-format.

Tree-SHA512: e17d20ec0e6c4e19410198b55687ebbe6fa01654d214d4578cd16c00b872bf8b0b306594a45523685cd2e9d9280702e00471d9366e87954428e8bbeacd8cad60
2021-10-08 19:13:56 +05:30
MarcoFalke
ea750966f9
Merge #12246: Bugfix: Only run bitcoin-tx tests when bitcoin-tx is enabled
a2a04a5abb Bugfix: Only run bitcoin-tx tests when bitcoin-tx is enabled (Luke Dashjr)
92af71cea9 configure: Make it possible to build only one of bitcoin-cli or bitcoin-tx (Luke Dashjr)

Pull request description:

  Includes #5618 (which the reasons for rejecting no longer hold true)

Tree-SHA512: f30a8e4a2f70166b7cabef77c4674163b3a9da14c6a547d34f00d1056a19bf4d23e22851eea726fad2afc8735d5473ae91122c770b65ac3886663dc20e2c5b70
2021-10-08 19:13:56 +05:30
Wladimir J. van der Laan
f4cac953c3
Merge #14903: tests: Handle ImportError explicitly, improve comparisons against None
c9ba253f4f5d675d7736d24c1167229d0898ef1a Add E711 to flake8 check (Daniel Ingram)
17b55202dae8d6e21d2490de89b345c55f7694c0 Compare to None with is/is not (Daniel Ingram)
1b89074ae27ce123adbeed57343deaef13c14f81 Change '== None' to 'is None' (Daniel Ingram)
16d293772365d57cc1a279d5ad0fa6f44b12ed54 Handle exception as ImportError (Daniel Ingram)

Pull request description:

Tree-SHA512: aa5875ea3d9ac47ac898545ff023b511042cd377ea0c4594074daae119f3d4f3fc295721aad94a732a907086ecb32bce19a8eed38adf479f12663c4e8944f721
2021-10-08 19:13:52 +05:30
MarcoFalke
5cc78ce06b Merge #13787: Test for Windows encoding issue
15b31032a6 appveyor: Remove outdated libraries (Chun Kuan Lee)
ae892adceb tests: accept unicode characters on Windows (Chun Kuan Lee)

Pull request description:

  This PR removes unused Windows compatible path. Encoding issues has been solved.

Tree-SHA512: d24dce035fe3b576eaa002896f815a6691e88618ea371171d7e39883e1d63b3ed4d4631ab3b3a26bd67ae4e8ae13b1ff188942ab7ac6a93d704e0de301368cd0

# Conflicts:
#	.appveyor.yml
2021-10-06 20:05:01 -04:00
Wladimir J. van der Laan
6ef164513c Merge #14151: windows: Fix remaining compiler warnings (MSVC)
b9dafe7d9ffcbe7928ffbfba816b54e196c57664 Fix remaining compiler warnings (MSVC). Move disabling of specific warnings from /nowarn to project file. (practicalswift)

Pull request description:

  Fix remaining compiler warnings (MSVC).

  Before:

  ```
  $ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715 /nologo
  …\script\script.cpp(272): warning C4018: '>': signed/unsigned mismatch
  …\test\allocator_tests.cpp(147): warning C4312: 'reinterpret_cast': conversion from 'int' to 'void *' of greater size
  …\boost\test\tools\old\impl.hpp(107): warning C4805: '==': unsafe mix of type 'const Left' and type 'const Right' in operation
  …\test\crypto_tests.cpp(535): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
  …\test\script_tests.cpp(188): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  …\test\script_tests.cpp(190): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  …\test\script_tests.cpp(191): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  $
  ```

  After:

  ```
  $ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715;C4805 /nologo
  $
  ```

Tree-SHA512: 5b30334d3804e869779e77dad75a799e8e5e7eb2e08634cd40035cce140edd623cbb6c8b5806d2158c3df97888d3ea9ff4b8b6a5a83de3fe2cb361e29588c115

# Conflicts:
#	.appveyor.yml
#	build_msvc/common.vcxproj
#	src/test/script_tests.cpp
2021-10-06 20:05:01 -04:00
Kittywhiskers Van Gogh
f22be5a16b refactor: llmq/quorums_*[cpp/h] --> llmq/*.[cpp/h] 2021-10-06 09:04:45 +05:30
UdjinM6
28a5e599bf
Merge pull request #4487 from UdjinM6/fix_linter_p1
backport 15166, 15257, 16667, 16186, partial 16465, 16907, 16921, 16961, partial 19348, 21096
2021-10-06 00:55:44 +03:00
PastaPastaPasta
8d5c586477
refactor: replace instances of typedef with using in dash code (#4488) 2021-10-06 00:26:29 +03:00
gabriel-bjg
b4d001a602
instantsend: deterministic lock using the same msg hash as islock (#4381)
When receiving an islock, propagate it as islock.
When creating/receiving and isdlock, propagate it as isdlock to peers which support it and as islock to peers which don't.
Functional tests to cover both islock and isdlock scenarios.
2021-10-05 20:42:34 +03:00
UdjinM6
1b3bd26138
Fix python dead code warnings
Fixes
```
contrib/auto_gdb/log_size.py:22: unused variable 'from_tty' (100% confidence)
contrib/auto_gdb/used_size.py:29: unused variable 'from_tty' (100% confidence)
```
2021-10-05 20:34:01 +03:00
MarcoFalke
078ae49dc7
partial merge #19348: test: Bump linter versions
39d526bde48d98af4fa27906e85db0399b6aa8b1 test: Bump linter versions (Duncan Dean)

Pull request description:

  As per #19346, `mypy==0.700` was incompatible with Python 3.8.

  I've bumped the versions of all the linters to their latest stable versions.

  Checked with both Python 3.7 and 3.8 and everything still seems to work fine.

ACKs for top commit:
  hebasto:
    ACK 39d526bde48d98af4fa27906e85db0399b6aa8b1, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: f3ee7fda8095aa25aa68685e863076d52a6b82649770d24b0064d652763c0ceb8ebcbf9024fc74fca45c754e67b2a831dd070b3af23bc099140e6d27e89a5319
2021-10-05 20:34:01 +03:00
MarcoFalke
60b3c5a64e
Merge #15257: Scripts and tools: Bump flake8 to 3.7.8
3d0a82cff8cbb809876e82dbe62d14d2adc07d94 devtools: Accomodate block-style copyright blocks (Ben Woosley)
0ef0e51fe4bb592e67255776b5a0ba04679fb8c4 lint: Bump flake8 to 3.7.8 (Ben Woosley)
838920704ad90a71cf288b700052503db8abb17e lint: Disable flake8 W504 warning (Ben Woosley)
b21680baf5391a602b295b9d7d0ef66553661cb9 test/contrib: Fix invalid escapes in regex strings (Ben Woosley)

Pull request description:

  This is a second go at #15221, fixing new lints in:
  W504 line break after binary operator
  W605 invalid escape sequence
  F841 local variable 'e' is assigned to but never used

  This time around:
  * One commit per rule, for easier review
  * I went with the PEP-8 style of breaking before binary operators
  * I looked into the raw regex newline issue, and found that raw strings with newlines embedded do work appropriately. E.g. run `re.match(r" \n ", " \n ")` to check this for yourself. `re.MULTILINE` exists to modify `^` and `$` in multiline scenarios, but  all of these searches are per-line.

ACKs for top commit:
  practicalswift:
    ACK 3d0a82cff8cbb809876e82dbe62d14d2adc07d94 -- diff looks correct

Tree-SHA512: bea0c144cadd72e4adf2e9a4b4ee0535dd91a8e694206924cf8a389dc9253f364a717edfe9abda88108fbb67fda19b9e823f46822d7303c0aaa72e48909a6105
2021-10-05 20:34:01 +03:00
MarcoFalke
dbfa92990a
Merge #21096: Re-add dead code detection
3f8776a1391c3978ed66144df15fd9bcb9edd35d Re-add dead code detection (flack)

Pull request description:

  This re-adds unreachable code detection for Python based on `vulture`.

  Effectively, this reverts f4beb4996d27f2cdaf4f0a63e7dc044bf17decce. The difference to the previous version is that this runs with the `--min-confidence 100` setting. From https://pypi.org/project/vulture/:

  > Use `--min-confidence 100` to only report code that is guaranteed to be unused within the analyzed files.

  So this should avoid the previous issues where static analysis had wrong positives due to the dynamic nature of Python code by only reporting things that are unambiguous (such as code after a `return` statement). As such, there is not suppressions list.

  My motivation was mainly #21081 which would have been caught by this (as can be seen by the CI run failing). This is still marked as draft because #21081 is needed to get the linter to pass. Also, there is a second problem that this found (see https://github.com/bitcoin/bitcoin/pull/19509/files#r571454691). From what I can tell, this is a spurious type comment that could just be removed (or if that line has no side effects it could also be deleted altogether?). I could add a commit here to fix it, but I wanted to see if there is interest in having this linter again in the first place

ACKs for top commit:
  practicalswift:
    ACK 3f8776a1391c3978ed66144df15fd9bcb9edd35d

Tree-SHA512: 52314ad4f627d969de1eb15375ca677ed86a2e816fe773756a1ce22421214ba407b5a09a4bf701a3aab1a10c7b336f548e4cef3327edf154acba55e987db21f6
2021-10-05 20:34:00 +03:00
MarcoFalke
313d79e319
Merge #16961: test: Remove python dead code linter
f4beb4996d27f2cdaf4f0a63e7dc044bf17decce test: Remove python dead code linter (Wladimir J. van der Laan)

Pull request description:

  Primarily I'd like to remove this because it is very imprecise, due to Python's dynamic nature, giving it a large list of false positives that need to be listed as exceptions. See for example #16906.

  It's also a frequent source of complaints. I'm doubtful of the usefulness of checking for dead code in a linter in the first place.
  Having some dead code in the test framework for a while is not a
  disaster.

ACKs for top commit:
  sdaftuar:
    utACK f4beb4996d27f2cdaf4f0a63e7dc044bf17decce
  practicalswift:
    ACK f4beb4996d27f2cdaf4f0a63e7dc044bf17decce -- diff looks correct
  jamesob:
    ACK f4beb4996d

Tree-SHA512: 329b1555210311d5d15799fd2cb794b3208b0ac4d8a2ffaf4dece1bcc3e0e8b1fe952d5e7a394f94a98919cab579fb579eae7db2a796cc9a1a42ef495dd17507
2021-10-05 20:34:00 +03:00
MarcoFalke
a8f615748c
Merge #16907: test: lint: Add DisabledOpcodeTemplates to whitelist
fac35b21e2c2d798face7e289dcff4c1cce0e1a6 test: lint: Add DisabledOpcodeTemplates to whitelist (MarcoFalke)

Pull request description:

  Fixes #16906

Top commit has no ACKs.

Tree-SHA512: 98b175bb062425fd3a8bd0d0258f4c0e0d5106980f1e037df7c2b2b2e5aa6031b11b582c026265d7b2de56049ccbadb0b7add9130d323f15886f681c6268ba0a
2021-10-05 20:34:00 +03:00
fanquake
dc14874d3e
Merge #16921: tests: Add information on how to add Vulture suppressions
72a18a73af26ea551d39397787a2d178c8bbde7b tests: Add information on how to add Vulture suppressions (practicalswift)

Pull request description:

  Add information on how to add `vulture` suppressions.

  As requested by MarcoFalke in https://github.com/bitcoin/bitcoin/issues/16906#issuecomment-533264107 -- your wish is my command! :)

ACKs for top commit:
  fanquake:
    ACK 72a18a73af26ea551d39397787a2d178c8bbde7b - similar sort of message as in [lint-spelling.sh](https://github.com/bitcoin/bitcoin/blob/master/test/lint/lint-spelling.sh).

Tree-SHA512: b347f8cea33d4b0ba987a972979b0ac3423938084fea923a2c457a8081bc839a94ad818689d147477104b9197dc35be413f76a96026cd1507b4411d7513e3464
2021-10-05 20:34:00 +03:00
MarcoFalke
7aefec8de0
partial merge #16465: lint: Add false positive to python dead code linter 2021-10-05 20:34:00 +03:00
fanquake
53b2f81892
Merge #16186: doc/lint: Fix spelling errors identified by codespell 1.15.0
b748bf6f50dda6bb57eadf697edc320b2695e01a Fix spelling errors identified by codespell 1.15.0 (Ben Woosley)

Pull request description:

  Note all changes are to comments / documentation.

  After this commit, the only remaining output is:

  ```
    $ test/lint/lint-spelling.sh
    src/test/base32_tests.cpp:14: fo  ==> of, for
    src/test/base64_tests.cpp:14: fo  ==> of, for
    ^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in test/lint/lint-spelling.ignore-words.txt
  ```

  Note:
  * I ignore several valid alternative spellings ~, but changed homogenous
  to homogeneous as the latter is a more specific term according to the
  Google dictionary definitions I found~
  * homogenous is present in tinyformat, hence should be addressed upstream
  * process' is correct only if there are plural processes

ACKs for commit b748bf:
  practicalswift:
    ACK b748bf6f50dda6bb57eadf697edc320b2695e01a
  fanquake:
    ACK b748bf6f50

Tree-SHA512: 9add7044643ce015e0a44d8b27a3f300d72c485ffff550fb6491a17f14528085289ec5caddfe02f291ea9b2cded38a0dd3079652a054e2d7fe2ff4f7b53db5d7
2021-10-05 20:34:00 +03:00
MarcoFalke
26449bcccf
Merge #15166: qa: Pin shellcheck version
a517541794 Remove no longer needed shellcheck suppressions (practicalswift)
0b7196ecad Fix warnings introduced in shellcheck v0.6.0 (practicalswift)
07a53dce9f Remove repeated suppression. Fix indentation. (practicalswift)
638e53b472 Pin shellcheck version to v0.6.0 (practicalswift)

Pull request description:

  Pin `shellcheck` version.

Tree-SHA512: 996e438e424020fe888de1d77ffd33fa32848332febfffbc21a842784aee339332c79c41687c9c577ba1206eb20674623157d584a072e8ae88ae086ee2277bc8
2021-10-05 20:33:59 +03:00
MarcoFalke
d7707cde7a
Merge #16667: build: remove mingw linker workaround from win gitian descriptor
bd3f5a90ecd6de40516141b23b0861dbba0b31b6 build: remove mingw linker workaround from win gitian descriptor (fanquake)

Pull request description:

  This workaround was added as part of the switch to gitian building using Ubuntu 14.04 (#6900).
  However, it should no longer be required, as we have switched to Bionic (#13171) and that
  has a far newer version of binutils.

  Original discussion: https://github.com/bitcoin/bitcoin/pull/6900
  binutils patch: https://sourceware.org/bugzilla/show_bug.cgi?id=16192

ACKs for top commit:
  MarcoFalke:
    ACK bd3f5a90ecd6de40516141b23b0861dbba0b31b6
  theuni:
    ACK bd3f5a90ecd6de40516141b23b0861dbba0b31b6
  laanwj:
    ACK bd3f5a90ecd6de40516141b23b0861dbba0b31b6

Tree-SHA512: 01a5789994decf8cdedf7aaa0a449d2100a77e2e6b422d6b9dd5a4ac3e2e0b538c3d43aae4a1c3713614782f3c6b09d8d8bb21c20e86ce3c1734183dedd02d0c
2021-10-05 20:33:55 +03:00
UdjinM6
7b94386da3
ci: Drop excessive $CI_PROJECT_DIR (#4485)
Paths are relative to `$CI_PROJECT_DIR`:
https://docs.gitlab.com/ee/ci/yaml/index.html#cachepaths
https://docs.gitlab.com/ee/ci/yaml/index.html#artifactspaths
2021-10-05 19:58:19 +03:00
PastaPastaPasta
07b1d52b03
Merge pull request #4477 from kittywhiskers/dependsbp
merge bitcoin#19817, bitcoin#20470, bitcoin#22993: macOS C++17 bump
2021-10-05 12:05:35 -04:00
Kittywhiskers Van Gogh
5856f2c124 merge bitcoin#22993: set OSX_MIN_VERSION to 10.15 2021-10-05 08:04:26 +05:30
Kittywhiskers Van Gogh
fd03a23e85 merge bitcoin#20470: Replace genisoimage with xorriso 2021-10-05 08:04:26 +05:30
Kittywhiskers Van Gogh
091477d853 merge bitcoin#19817: macOS toolchain bump 2021-10-05 08:04:26 +05:30
UdjinM6
3c4d02a85f
ci: Generate new cache key when ci/Dockerfile.builder changes (#4483)
See https://docs.gitlab.com/ee/ci/yaml/index.html#cachekeyfiles
2021-10-05 02:43:42 +03:00
UdjinM6
cbf81a7dc8
cj: Fix deadlock in SignFinalTransaction (#4474)
```
POTENTIAL DEADLOCK DETECTED
Previous lock order was:
 cs_deqsessions coinjoin/coinjoin-client.cpp:141 (in thread )
 ::mempool.cs coinjoin/coinjoin-client.cpp:561 (in thread )
 (1) cs_coinjoin coinjoin/coinjoin-client.cpp:561 (in thread )
 (2) cs_wallet wallet/wallet.cpp:315 (in thread )
Current lock order is:
 cs_deqsessions coinjoin/coinjoin-client.cpp:980 (in thread )
 cs_main coinjoin/coinjoin-client.cpp:788 (in thread )
 mempool.cs coinjoin/coinjoin-client.cpp:788 (in thread )
 (2) mixingWallet.cs_wallet coinjoin/coinjoin-client.cpp:789 (in thread )
 (1) cs_coinjoin ./coinjoin/coinjoin.h:369 (in thread )
```

Introduced in 4463
2021-10-01 23:30:58 +03:00
UdjinM6
dd7af8a690
test: Fix expected warnings in feature_pruning.py (#4476)
"No governance validation" warnings.

More of 12755.
2021-10-01 22:19:23 +03:00
Kittywhiskers Van Gogh
cb1d4766f5
refactor: remove redundant filename prefixes for Dash-specific logic (#4475)
* refactor: coinjoin/coinjoin-*[cpp/h] --> coinjoin/*.[cpp/h]

* refactor: governance/governance-*[cpp/h] --> governance/*.[cpp/h]

* refactor: masternode/masternode-*[cpp/h] --> masternode/*.[cpp/h]

* fix linter

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-10-01 22:19:08 +03:00
UdjinM6
38aeb47cc4
Merge pull request #4468 from Munkybooty/backports-0.19-pr1
Backports 0.19 pr1
2021-10-01 20:10:29 +03:00
MarcoFalke
4b4fb27f1d Merge #15527: doc: Move pr release notes file in wrong dir 2021-10-01 09:48:23 -04:00
MarcoFalke
97775c22fe Merge #15683: Comment for seemingly duplicate LIBBITCOIN_SERVER
2a1408c3ec Comment for seemingly duplicate LIBBITCOIN_SERVER (Peter Bushnell)

Pull request description:

  Added a comment to explain the addition of LIBBITCOIN_SERVER twice in bitcoind_LDADD which seems incorrect at a glance until the behaviour of Linux linkers is understood.

ACKs for commit 2a1408:
  practicalswift:
    ACK 2a1408c3ec036d9f89c4241689cd16f26093b209
  MarcoFalke:
    ACK 2a1408c
  fanquake:
    utACK 2a1408c
  ryanofsky:
    utACK 2a1408c3ec036d9f89c4241689cd16f26093b209

Tree-SHA512: dd2a7f61d53ce8882a56c831c32e1f48e9eab741ef21361f195c38bb455abdc4bc524d3b44b6f69c7498898cd871a23c39d215de28db3b20ef5fd2135d5e136a
2021-10-01 09:48:23 -04:00
MarcoFalke
3c674812f3 Merge #15631: qa: mininode: Clearer error message on invalid magic bytes
fab0a68aa2 qa: mininode: Clearer error message on invalid magic bytes (MarcoFalke)

Pull request description:

  Old message:
  ```
  ValueError: got garbage b'\xfa\xbf\xb5\xdafeefilter\x00\x00\x00\x08\x00\x00\x00\xe8\x0f\xd1\x9f\xe8\x03\x00\x00\x00\x00\x00\x00'
  ```

  New message:
  ```
  ValueError: magic bytes mismatch: b'\x00\x11"2' != b'\xfa\xbf\xb5\xdapong\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x97\xe6\x04\xd2\xff\x00\x00\x00\x00\x00\x00\x00'
  ```

ACKs for commit fab0a6:
  laanwj:
    Much better message, utACK fab0a68aa25191a532f26cf8e227f456b853d8f1

Tree-SHA512: 55854ef93d79c4f3219440e367fbcdf5db7b54c6530db0087fa8f8d9e786dac713f05da6f6c4c3cf29e18d07b4472f96a8ed894d66318e08cf8f208252199b70
2021-10-01 09:48:23 -04:00
Wladimir J. van der Laan
5a88911bfb Merge #15609: scripts and tools: Set 'distro' explicitly
b8705a091565d4373e0e8ad4aa764cfd906708db Set 'distro' explicitly (Hennadii Stepanov)

Pull request description:

  The [gitian-builder](https://github.com/devrandom/gitian-builder) implicitly uses `ubuntu` as a default distro.

  [bin/gbuild#L237](81edd2fc8e/bin/gbuild (L237)):
  ```ruby
  distro = build_desc["distro"] || "ubuntu"
  ```

  This PR sets a gitian building distro explicitly in description files.

Tree-SHA512: d2a692047f3466a5c637433610854d1100fe68a78fb03b4a81c70911fa14b0228d9cf25bcf115930aab9cc8c5063dacaf79bcd151f1c3f6fee6419389aefcb8b
2021-10-01 09:48:23 -04:00
MarcoFalke
34140a2cfc Merge #15564: cli: remove duplicate wallet fields from -getinfo
3f6568d66b cli: remove duplicate wallet fields from -getinfo (fanquake)

Pull request description:

  `walletversion` and `balance` are both included below.

Tree-SHA512: cd9fe9739a2f492c8f7c0407b43a6fa95187f7e5318f05e080bac112f9f4333d2e9b84c505d098f8d66fa79439007d1c0b22e5a87d70bf5ea53ab647ee4c2046
2021-10-01 09:48:23 -04:00
MarcoFalke
1e0aa634b2 Merge #15566: cli: replace testnet with chain and return network name as per BIP70.
890396cbd5 cli: replace testnet with chain and return network name as per BIP70. (fanquake)

Pull request description:

  Related IRC discussion [here (line 151)](http://www.erisian.com.au/bitcoin-core-dev/log-2019-03-09.html).

Tree-SHA512: 8bdbacc7b8ce8bd2cc7c47aa9d73f2830a7c2e2ec43686430e3fba1a9db0e53a285467f26cde6dcc3bf948b7d6d59b9b7f184ce1a30a8970f39e5396dfc122f0
2021-10-01 09:42:27 -04:00
Wladimir J. van der Laan
b5c4423b58 Merge #15513: docs: add "sections" info to example bitcoin.conf
3eac2d57b1ff563bc9cfe123f6ded2764cc50da0 docs: add "sections" info to example bitcoin.conf (Alistair Mann)

Pull request description:

  Rebased / commit message fixed version of #15387.
  This had ACKs, but just needed the commit message fixed up.

  > Most bitcoin.conf options apply to all three networks,
  however some apply only to mainnet unless specified in a section.
  As stands, conf file has no indication that sections are now in use
  or are in some circumstances mandatory (eg, changing rpcport for testnet.)

  > Proposed change notifies the reader early which options are affected,
  specifically adds those options affected but not already in the example,
  adds brief explanation as to what's going on and provides a skeleton template for the sections themselves.

Tree-SHA512: 3331f2cac23d082bda2dcdea7d579360bc464d8e2123d634b810e9ba8edb5162bd62bd86f846b5299a04a3d77636a77e2fd3837c3272b22bc0d9a685d5156062
2021-10-01 09:42:27 -04:00
UdjinM6
4c72a1a975
Merge pull request #4453 from dzutte-cpp/merge_14268_15408_partial14094_14969
Merge 0.18 PRs: #14268, #15408, #14094, #14935 and #14969
2021-10-01 15:28:17 +03:00
PastaPastaPasta
9da186bb61
refactor: Various small improvements (#4471)
* bls: use constexpr int instead of #define

* lint: bump c++ version to 17

* test: use BOOST_CHECK_EQUAL instead of BOOST_ASSERT, call boost assert in another location

* coinjoin: fix typo

* drop redundant LLMQType cast

* use numeric_limits instead of magic value

* net_processing.cpp whitespace fixes

* Add some const

* use std::all_of instead of raw for loop

* Introduce UNINITIALIZED_SESSION_ID and use it instead of a magic number

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-10-01 14:44:40 +03:00
Wladimir J. van der Laan
8b47451341 Merge #14268: Introduce SafeDbt to handle Dbt with free or memory_cleanse raii-style
4a86a0acd9ac3ca392f0584a5fd079a856e5e4ba Make SafeDbt DB_DBT_MALLOC on default initialization (Ben Woosley)
1a9f9f7e5e2e73fb832f5b96ad7e9e57954f3f3c Introduce SafeDbt to handle DB_DBT_MALLOC raii-style (Ben Woosley)
951a44e9cd6cf2b8058244f3f95181c5ba683fdd Drop unused setRange arg to BerkeleyBatch::ReadAtCursor (Ben Woosley)

Pull request description:

  This provides additional exception-safety and case handling for the proper
  freeing of the associated buffers.

Tree-SHA512: a038d728290cdb3905e7d881608052a6675b6425729ceaf7cfe69a6e91c2ee293cdb01e4b695a20963459ffdd9d4a1f9a08b3c07b1b5ba1aa8590a8149f686db
2021-09-30 17:02:16 -07:00
Wladimir J. van der Laan
6e91a22d80 Merge #14969: tests: Fix cuckoocache_tests TSAN failure introduced in 14935.
d98a29ec408590e54f405a7f8d232cd9dc5b14da Fix cuckoocache_tests TSAN failure introduced in #14935. Fixes #14967. (practicalswift)

Pull request description:

  Fix cuckoocache_tests TSAN failure introduced in #14935. Fixes #14967.

Tree-SHA512: aabbfa3ab41d9f498151a9b50a2a875fd51ed609bb54d89292114f59392aae57c85fdd5b7a04b589fbf598aaf736b425a6f62b12c806a1fa23bdd45d2d2accfb
2021-09-30 16:18:49 -07:00
Wladimir J. van der Laan
38d928e9c6 Merge #14094: refactoring: Remove unreferenced local variables
8ecaee13f70a2062e88a977c950a65d3a2de560f Increase signal to noise in appveyor build output by reducing the MSVC warning count from 12 to 4 (12 is assuming the changes in #14086 are also implemented). (practicalswift)

Pull request description:

  Remove unreferenced local variables:

  Increase signal to noise in appveyor build output by reducing the MSVC warning count from 12 to 4. 12 is the number of MSVC warnings under our current appveyor setup assuming the changes in #14086 are also implemented.

  This makes it easier to spot errors or more important warnings in the verbose appveyor output. MSVC warnings are good, so having access to them in a noise free way (read: without trivial warnings) via appveyor without having to use Windows is really valuable.

  See https://github.com/bitcoin/bitcoin/pull/14086#issuecomment-416610313 plus discussion for context.

  Before:

  ```
  c:\projects\bitcoin\src\script\script.cpp(272): warning C4018: '>': signed/unsigned mismatch [C:\projects\bitcoin\build_msvc\libbitcoinconsensus\libbitcoinconsensus.vcxproj]
  c:\projects\bitcoin\src\rest.cpp(467): warning C4101: 'e': unreferenced local variable [C:\projects\bitcoin\build_msvc\libbitcoin_server\libbitcoin_server.vcxproj]
  c:\projects\bitcoin\src\test\allocator_tests.cpp(147): warning C4312: 'reinterpret_cast': conversion from 'int' to 'void *' of greater size [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
  c:\projects\bitcoin\src\test\coins_tests.cpp(511): warning C4101: 'e': unreferenced local variable [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
  c:\projects\bitcoin\src\test\coins_tests.cpp(524): warning C4101: 'e': unreferenced local variable [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
  c:\projects\bitcoin\src\test\coins_tests.cpp(722): warning C4101: 'e': unreferenced local variable [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
  c:\projects\bitcoin\src\test\coins_tests.cpp(783): warning C4101: 'e': unreferenced local variable [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
  c:\projects\bitcoin\src\test\crypto_tests.cpp(535): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
  c:\projects\bitcoin\src\test\dbwrapper_tests.cpp(265): warning C4101: 'e': unreferenced local variable [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
  c:\projects\bitcoin\src\test\net_tests.cpp(118): warning C4101: 'e': unreferenced local variable [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
  c:\projects\bitcoin\src\test\net_tests.cpp(151): warning C4101: 'e': unreferenced local variable [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
  c:\projects\bitcoin\src\test\scheduler_tests.cpp(57): warning C4305: 'argument': truncation from 'int' to 'bool' [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
  ```

  After:

  ```
  c:\projects\bitcoin\src\script\script.cpp(272): warning C4018: '>': signed/unsigned mismatch [C:\projects\bitcoin\build_msvc\libbitcoinconsensus\libbitcoinconsensus.vcxproj]
  c:\projects\bitcoin\src\test\allocator_tests.cpp(147): warning C4312: 'reinterpret_cast': conversion from 'int' to 'void *' of greater size [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
  c:\projects\bitcoin\src\test\crypto_tests.cpp(535): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
  c:\projects\bitcoin\src\test\scheduler_tests.cpp(57): warning C4305: 'argument': truncation from 'int' to 'bool' [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
  ```

Tree-SHA512: 5051134126c570b8421d57c710f1f1b977600398d2b5e69f8a8bd766b3696f992bf4e3459643b99a6b7e08dee1adc92985ee4d0d52b20755954415cb6f23f2fb
2021-09-30 16:18:49 -07:00