Commit Graph

1095 Commits

Author SHA1 Message Date
MarcoFalke
652a36b0f2 Merge #15943: tests: Fail if RPC has been added without tests
fad0ce59e9 tests: Fail if RPC has been added without tests (MarcoFalke)

Pull request description:

  Need to be run with --coverage

ACKs for commit fad0ce:
  ryanofsky:
    utACK fad0ce59e9154f9b7e61907a71c740a942c60282. New comment in travis.yml is the only change since last review.

Tree-SHA512: b53632dfe9865ec06991bfcba2fd67238bebbb866b355f09624eaf233257b2bca902caac6c24abb358b2f4c1c43f28ca75e30982765911e1a117102df65276d9
2021-10-12 15:56:33 -07:00
MarcoFalke
0d58cdabb7 Merge #15841: [test] combine_logs: append node stderr and stdout if it exists
fa90a89eee [test] combine_logs: append node stderr and stdout if it exists (MarcoFalke)

Pull request description:

  See issue:

  * tests: bitcoind stdout and error should be passed to the logger #13519

ACKs for commit fa90a8:
  laanwj:
    utACK fa90a89eeefcc362970216d95973ad01a21366ed

Tree-SHA512: 39c4596e2e133c9011ab01bc4dc24e884d0a8cce7a67d3765f17c288d3ffbd438e1ff6016d0f817a981b27fce17fa77a1ff56787ddb1ea55123ce9ecffb44c08
2021-10-12 15:56:33 -07:00
MarcoFalke
772dad995c Merge #14683: tests: better combine_logs.py behavior
4aabadbf44 tests: have combine_logs default to most recent test dir (James O'Beirne)

Pull request description:

  Have `combine_logs.py` default to the most recent test directory if no argument is provided. This allows you to avoid an annoying copy-paste when iterating on a failing test, since you can do something like
  ```sh
  alias testlogs='./test/functional/combine_logs.py -c | less'

  ./test/functional/some_test.py  # fails
  testlogs
  ```

Tree-SHA512: 919642ab09c314888a23c9491963b35b9da87e60deb740d1d5e816444aa9bdda5e519dc8ca131669f2d563167ef5f5abb14e22f20f47bf8362915ed578181846
2021-10-12 15:56:33 -07:00
Dzutte
0f2e8aa504
Merge bitcoin#14726: Use RPCHelpMan for all RPCs (#4492)
* Merge #14726: Use RPCHelpMan for all RPCs

fa5e0452e875a7ca6bf6fe61fdd652d341eece40 rpc: Documentation fixups (MarcoFalke)
fa91e8eda541acdb78ca481b74605639f319c108 Use RPCHelpMan for all RPCs (MarcoFalke)
fa520e72f7b5964cea1ade666e71212914556cf3 lint: Must use RPCHelpMan to generate the RPC docs (MarcoFalke)

Pull request description:

  The resulting documentation should not change unless the type in the oneline-summary was previously incorrect. (E.g. string vs bool)

Tree-SHA512: 4ff355b6a53178f02781e97a7aca7ee1d0d97ff348b6bf5a01caa1c96904ee33c704465fae54c2cd7445097427fd04c71ad3779bb7a7ed886055ef36c1b5a1d0

* Dash-specific changes to support RPCHelpMan with RPC commands

Signed-off-by: Dzutte <dzutte.tomsk@gmail.com>

Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
2021-10-12 00:55:23 +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
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
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
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
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
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
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
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
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
UdjinM6
6eeb1520aa
Merge pull request #4458 from PastaPastaPasta/chainlocks-boost-thread
backport 18234, 19090 and remove usage of boost thread in chainlocks code
2021-09-29 19:22:35 +03:00
Wladimir J. van der Laan
9b8884b430
partial Merge #18234: refactor: Replace boost::mutex,condition_var,chrono with std equivalents in scheduler
This backport does not include changes that depend on bitcoin pr 18037

70a6b529f306ff72ea1badf25e970a92b2b17ab3 lint-cppcheck: Remove -DHAVE_WORKING_BOOST_SLEEP_FOR (Anthony Towns)
294937b39de5924e772f8ed90d35c53290c8acab scheduler_tests: re-enable mockforward test (Anthony Towns)
cea19f685915be8affb2203184a549576194413f Drop unused reverselock.h (Anthony Towns)
d0ebd93270758ea97ea956b8821e17a2d001ea94 scheduler: switch from boost to std (Anthony Towns)
b9c426012770d166e6ebfab27689be44e6e89aa5 sync.h: add REVERSE_LOCK (Anthony Towns)
306f71b4eb4a0fd8e64f47dc008bc235b80b13d9 scheduler: don't rely on boost interrupt on shutdown (Anthony Towns)

Pull request description:

  Replacing boost functionality with C++11 stuff.

  Motivated by #18227, but should stand alone. Changing from `boost::condition_var` to `std::condition_var` means `threadGroup.interrupt_all` isn't enough to interrupt `serviceQueue` anymore, so that means calling `stop()` before `join_all()` is needed. And the existing reverselock.h code doesn't work with sync.h's DebugLock code (because the reversed lock won't be removed from `g_lockstack` which then leads to incorrect potential deadlock warnings), so I've replaced that with a dedicated class and macro that's aware of our debug lock behaviour.

  Fixes #16027, Fixes #14200, Fixes #18227

ACKs for top commit:
  laanwj:
    ACK 70a6b529f306ff72ea1badf25e970a92b2b17ab3

Tree-SHA512: d1da13adeabcf9186d114e2dad9a4fdbe2e440f7afbccde0c13dfbaf464efcd850b69d3371c5bf8b179d7ceb9d81f4af3cc22960b90834e41eaaf6d52ef7d331

# Conflicts:
#	src/reverselock.h
#	src/rpc/misc.cpp
#	src/scheduler.cpp
#	src/scheduler.h
#	src/sync.cpp
#	src/sync.h
#	src/test/reverselock_tests.cpp
#	src/test/scheduler_tests.cpp
#	src/test/test_dash.cpp
#	test/lint/extended-lint-cppcheck.sh
2021-09-28 19:42:22 -04:00
UdjinM6
2e0c51648a
Merge pull request #4456 from PastaPastaPasta/develop-trivial-2021-09-24
backport trivial 17553, 18596, 15782, 16051
2021-09-28 23:58:11 +03:00
UdjinM6
d9c523eead
Merge pull request #4451 from pravblockc/backports-v0.20-pr1
Merge bitcoin#17708: prevector: avoid misaligned member accesses
2021-09-28 23:49:42 +03:00
PastaPastaPasta
908b6e6535
partial Merge #14454: Add SegWit support to importmulti (#4440)
* partial Merge #14454: Add SegWit support to importmulti

c11875c5908a17314bb38caa911507dc6401ec49 Add segwit address tests for importmulti (MeshCollider)
201451b1ca3c6db3b13f9491a81db5b120b864bb Make getaddressinfo return solvability (MeshCollider)
1753d217ead7e2de35b3df6cd6573a1c9a068f84 Add release notes for importmulti segwit change (MeshCollider)
353c064596fc2e2c149987ac3b3c11b4c90c4d5f Fix typo in test_framework/blocktools (MeshCollider)
f6ed748cf045d7f0d9a49e15cc0c0001610b9231 Add SegWit support to importmulti with some ProcessImport cleanup (MeshCollider)

Pull request description:

  Add support for segwit to importmulti, supports P2WSH, P2WPKH, P2SH-P2WPKH, P2SH-P2WSH. Adds a new `witnessscript` parameter which must be used for the witness scripts in the relevant situations.

  Also includes some tests for the various import types.

  ~Also makes the change in #14019 redundant, but cherry-picks the test from that PR to test the behavior (@achow101).~

  Fixes #12253, also addresses the second point in #12703, and fixes #14407

Tree-SHA512: 775a755c524d1c387a99acddd772f677d2073876b72403dcfb92c59f9b405ae13ceedcf4dbd2ee1d7a8db91c494f67ca137161032ee3a2071282eeb411be090a

# Conflicts:
#	src/wallet/rpcdump.cpp
#	test/functional/test_framework/blocktools.py
#	test/functional/wallet_importmulti.py

* make linter happy

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

* Fixes: trivial + linter + add missing consistency check + more/redo 14679

Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-09-28 22:48:33 +03:00
MarcoFalke
af79508f7e Merge #18596: test: Try once more when RPC connection fails on Windows
fab98992043f47fa7240d7c1217920d0c4f783a2 test: Try once more when RPC connection fails on Windows (MarcoFalke)
faa655731eac751d4eb494268e2c815493ba9382 test: Document why connection is re-constructed on windows (MarcoFalke)
fa9f4f663c36b0824406036445e5cff0a78174e9 test: Remove python 3.4 workaround (MarcoFalke)
fae760f2b24cb26494b65c0a7ac38b92ead345af cirrus: Bump freebsd to 12.1 (MarcoFalke)

Pull request description:

  Fixes: #18548

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

Tree-SHA512: c4e9ed8d995b63a820ca66984f152ac216c83ba1f318b61b15c6d375c0e936c08f6bc3d38c255dddf3ee8952f848c7ababf684854e07a7c1b1d8504e6b7208ba
2021-09-28 14:46:44 -04:00
UdjinM6
d2c975dbd7
Merge pull request #4437 from PastaPastaPasta/backport-sept-17
Backport 14264, 14324, 14583, 14426, 13687
2021-09-25 02:55:50 +03:00
Pieter Wuille
9f0e8e1657
Merge #14426: utils: Fix broken Windows filelock
369244f654 utils: Fix broken Windows filelock (Chun Kuan Lee)

Pull request description:

  Fix broken filelock on Windows, also add a test for this. It's a regression introduced by #13862.

Tree-SHA512: 15665b1930cf39ec71f3ab07def8e2897659f6fd4d2de749d63a5a8ec920e4a04282f12bc262f242b1b3d14d2dd9fa191ddbcf16a46fb927b5b2b14d9f6b5d01
2021-09-24 18:48:45 -04:00
MarcoFalke
53744e79f0
Merge #14324: qa: Run more tests with wallet disabled
faa4043c66 qa: Run more tests with wallet disabled (MarcoFalke)

Pull request description:

  Instead of skipping the whole test, only skip the wallet specific section of a test if the wallet is not compiled in. This is mostly an indentation change, so can be reviewed with `--ignore-all-space`.

Tree-SHA512: 5941a8b6b00dca5cf9438c5f6f010ba812115188a69e427d7ade4c1ab8cfe7a57c73daf52c66235dbb24b1cd9ab7c7a17c49bc23d931e041b605d79116a71f66

Merge #14324: qa: Run more tests with wallet disabled

faa4043c66 qa: Run more tests with wallet disabled (MarcoFalke)

Pull request description:

  Instead of skipping the whole test, only skip the wallet specific section of a test if the wallet is not compiled in. This is mostly an indentation change, so can be reviewed with `--ignore-all-space`.

Tree-SHA512: 5941a8b6b00dca5cf9438c5f6f010ba812115188a69e427d7ade4c1ab8cfe7a57c73daf52c66235dbb24b1cd9ab7c7a17c49bc23d931e041b605d79116a71f66
2021-09-24 18:48:44 -04:00
UdjinM6
02b75f0566
Merge pull request #4449 from PastaPastaPasta/backport-trivial-pr22
Backport trivial pr22
2021-09-25 00:43:30 +03:00
Wladimir J. van der Laan
60531ed458 Merge #13687: travis: Check that ~/.bitcoin is never created
fabe28a0cdcfa13e0e595a0905e3642a960d3077 qa: Temporarily disable test that reads the default datadir location (MarcoFalke)

Pull request description:

Tree-SHA512: d114db29a18f684d207caa0d7c947b13c945e2dd8b6d7fdeacdf7aa194f8123579d1139331b9d308df69a1132796e805a9ab63580aebde9b719860c0ff4b5652

# Conflicts:
#	.travis.yml
#	test/functional/feature_config_args.py
2021-09-24 17:43:14 -04:00
UdjinM6
2d1b13bd90
Merge pull request #4435 from PastaPastaPasta/backport-trivial-pr20
Backport trivial pr20
2021-09-24 23:10:10 +03:00
MarcoFalke
1474a8f008
Merge bitcoin/bitcoin#22201: test: Fix TestShell to allow running in Jupyter Notebook
168b6c317ca054c1287c36be532964e861f44266 add dummy file param to fix jupyter (Josiah Baker)

Pull request description:

  this fixes argparse to use `parse_known_args`. previously, if an unknown argument was passed, argparse would fail with an `unrecognized arguments: %s` error.

  ## why
  the documentation mentions being able to run `TestShell` in a REPL interpreter or a jupyter notebook. when i tried to run inside a jupyter notebook, i got the following error:

  ![image](https://user-images.githubusercontent.com/7444140/121382910-57554880-c947-11eb-94f2-49da8679528c.png)

  this was due to the notebook passing the filename of the notebook as an argument. this is a known problem with notebooks and argparse, documented here: https://stackoverflow.com/questions/48796169/how-to-fix-ipykernel-launcher-py-error-unrecognized-arguments-in-jupyter

  ## testing
  to test, make sure you have jupyter notebooks installed. you can do this by running:
  ```
  pip install notebook
  ```
  or following instructions from [here](https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html).

  once installed, start a notebook (`jupyter notebook`), launch a python3 kernel and run the following snippet:

  ```python
  import sys

  # make sure this is the path for your system
  sys.path.insert(0, "/path/to/bitcoin/test/functional")
  from test_framework.test_shell import TestShell

  test = TestShell().setup(num_nodes=2, setup_clean_chain=True)
  ```

  you should see the following output, without errors:
  ![image](https://user-images.githubusercontent.com/7444140/121383301-a307f200-c947-11eb-83b6-6c50b2cada25.png)

  if you are unfamiliar with notebooks, here is a short guide on using them: https://jupyter.readthedocs.io/en/latest/running.html

ACKs for top commit:
  MarcoFalke:
    review ACK 168b6c317ca054c1287c36be532964e861f44266
  jamesob:
    crACK 168b6c317c
  practicalswift:
    cr ACK 168b6c317ca054c1287c36be532964e861f44266

Tree-SHA512: 4fee1563bf64a1cf9009934182412446cde03badf2f19553b78ad2cb3ceb0e5e085a5db41ed440473494ac047f04641311ecbba3948761c6553d0ca4b54937b4
2021-09-24 13:32:16 -04:00
MarcoFalke
857814d1eb
Merge #20069: test: Mention commit id in scripted diff error
3491bf358a81d41a386cd14581d15396354a6e6c test: Mention commit id in scripted diff error (Wladimir J. van der Laan)

Pull request description:

  Add commit id to make spotting the issue easier.

ACKs for top commit:
  robot-dreams:
    ACK 3491bf358a81d41a386cd14581d15396354a6e6c
  sipa:
    utACK 3491bf358a81d41a386cd14581d15396354a6e6c
  hebasto:
    ~ACK~ Concept ACK 3491bf358a81d41a386cd14581d15396354a6e6c, should help in situations like https://travis-ci.org/github/bitcoin/bitcoin/jobs/732481553

Tree-SHA512: 1ae66fa760f9e5d52e029bae71f6b5863f1efd7b95de3723ea09290944c9d7687f5ec6927aa115a3aebd6f2b993baa0c2433975c6ad5cd2858089013362eb599
2021-09-24 13:26:38 -04:00
Wladimir J. van der Laan
016e8c0bab
Merge #19936: Test: batch rpc with params
e1fdd2963baab68bb6a77af2ad7a07fcacd4e73e Test batch rpc with params (Gregory Sanders)

Pull request description:

  Useful as an example and test case.

ACKs for top commit:
  laanwj:
    ACK e1fdd2963baab68bb6a77af2ad7a07fcacd4e73e
  theStack:
    ACK e1fdd2963baab68bb6a77af2ad7a07fcacd4e73e

Tree-SHA512: 2d2ba8960916342b264a14624857d6dd10005be12efafb3e970b82656f721c8f3700ebc9b8809de1b2f887d482b772043504aeaeebc7f2e1c8203f076a451526
2021-09-24 13:26:38 -04:00
PastaPastaPasta
97709a2bfa
Merge #14813: qa: Add wallet_encryption error tests (#4438) 2021-09-24 12:56:10 +03:00
UdjinM6
b78ceed6ca
Merge pull request #4426 from Munkybooty/backports-0.18-pr17
Backports 0.18 pr17
2021-09-24 12:02:53 +03:00
UdjinM6
b6640644eb
Merge pull request #4442 from UdjinM6/pr4319_new
Backport #14023, #13825, #14411 (and revert #14441)
2021-09-24 12:01:27 +03:00
Wladimir J. van der Laan
56a75722c9 Merge #17708: prevector: avoid misaligned member accesses
5f26855f109af53a336d5f98ed0ae584e7a31f84 test: Remove ubsan alignment suppressions (Wladimir J. van der Laan)
9d933ef9191417b4b7d29eaa3c3a571f814acc8e prevector: avoid misaligned member accesses (Anthony Towns)

Pull request description:

  Ensure prevector data is appropriately aligned. Earlier discussion in #17530.

  **Edit laanwj**: In contrast to #17530, it does this without increase in size of any of the coin cache data structures (x86_64, clang)

  | Struct        | (size,align) before           | (size,align) after  |
  | ------------- | ------------- | ------- |
  | Coin | 48, 8        |     48, 8   |
  | CCoinsCacheEntry | 56, 8    |   56, 8  |
  | CScript | 32, 1       |      32, 8  |

ACKs for top commit:
  laanwj:
    ACK 5f26855f109af53a336d5f98ed0ae584e7a31f84
  practicalswift:
    ACK 5f26855f109af53a336d5f98ed0ae584e7a31f84
  jonatack:
    ACK 5f26855f109af53a336d5f98ed0ae584e7a31f84

Tree-SHA512: 98d112d6856f683d5b212410b73f3071d2994f1efb046a2418a35890aa1cf1aa7c96a960fc2e963fa15241e861093c1ea41951cf5b4b5431f88345eb1dd0a98a
2021-09-23 17:30:17 -03:00
MarcoFalke
8dd08373ab Merge #14381: test: Add missing call to skip_if_no_cli()
ff94da7887 tests: Make appveyor run with --usecli (practicalswift)
db01839361 test: Add missing call to skip_if_no_cli() (practicalswift)

Pull request description:

  Add missing call to `skip_if_no_cli()` as suggested by @MarcoFalke in #14365.

Tree-SHA512: b0a2ddfad0f81cc9544f63c4e490fb983d833a47c23522549d1200ea6a8a132b2cd4bf0d66b862ef3a548d8471128b80aea3525fb5dec65221e23f32a8d46746
2021-09-21 17:27:11 -04:00
MarcoFalke
799f0317ef Merge #14316: tests: exclude all tests with difference parameters in --exclude list
c7b3e487f2 tests: exclude all tests with difference parameters (Chun Kuan Lee)

Pull request description:

  Fix broken exclusion list in functional tests. See https://github.com/bitcoin/bitcoin/pull/14007#pullrequestreview-158309105

Tree-SHA512: b6c2b86fef13e3c00c695adaeeb3e47ee9b48877c71bc605d24201ce931b2ef3ae9f5f199071fa1ec5de2d7aadc478410094c380cc297922e683e9b2569cda03
2021-09-21 17:27:11 -04:00