Commit Graph

30578 Commits

Author SHA1 Message Date
Sebastian Falbesoner
65ed198295 wallet: refactor: inline function ReadOrderPos()
Since accounts were removed in commit c9c32e6b84,
this function is only called at one place and thus can be as well inlined. Also,
avoid a duplicate lookup by using the find() method and dereference, instead of
calling count() and operator[].
2021-09-10 16:17:03 +02:00
merge-script
053a5fc7d9
Merge bitcoin/bitcoin#22762: Raise InitError when peers.dat is invalid or corrupted
fa55c3dc1b Raise InitError when peers.dat is invalid or corrupted (MarcoFalke)
fa4e2ccfd8 Inline ReadPeerAddresses (MarcoFalke)
fa5aeec80c Move LoadAddrman from init to addrdb (MarcoFalke)

Pull request description:

  peers.dat is silently erased when it can not be parsed or when it appears corrupted. Fix that by notifying the user. This might help in the following examples:

  * The user provided the database, but picked the wrong one.
  * A future version of Bitcoin Core wrote the file and it can't be read.
  * The file was corrupted by a logic bug in Bitcoin Core.
  * The file was corrupted by a disk failure.

ACKs for top commit:
  jonatack:
    Code review re-ACK fa55c3dc1b per `git range-diff eb1f570 fa59c6d fa55c3` and verified the new tests fail on master, except "Check mocked addrman is valid", as expected
  prayank23:
    tACK fa55c3dc1b
  vasild:
    ACK fa55c3dc1b

Tree-SHA512: 78264a78ee570a3c3262cf9c8542b5ffaffa5f52da1eef66c8c381f346989272967cfe1769c573502d9d7d3f7ad68c3ac3b2ec734185d2e4e7595b7122b14196
2021-09-10 11:41:20 +02:00
merge-script
384d076011
Merge bitcoin/bitcoin#22880: doc: Added hyperlink for doc/build
67c85bdb2f doc: Added hyperlink for doc/build (pradumnasaraf)

Pull request description:

  Added hyperlink for the doc/build directory (https://github.com/bitcoin/bitcoin/tree/master/doc). This will be convenient for visitors to redirect.
  ![Screenshot (84)](https://user-images.githubusercontent.com/51878265/132031506-9f5f3935-b1ef-4b70-a097-cd453540108d.png)

Top commit has no ACKs.

Tree-SHA512: e920487d5b5bc77ae4ad63f47c400834b8ca5b4b199392ff9b8f2166a620e12b842b7dcc4b04e9b2f65903dfbf421625aae41e7d59ae23306a94604106013eca
2021-09-10 10:57:38 +02:00
merge-script
60881158c8
Merge bitcoin/bitcoin#22907: test: Avoid intermittent test failure in feature_csv_activation.py
fa676dbac8 test: pep-8 whitespace (MarcoFalke)
faed284eab test: Avoid intermittent test failure in feature_csv_activation.py (MarcoFalke)

Pull request description:

  Otherwise there will be disconnects if the test runs longer than the default peertimeout (60s):

  ```
   node0 2021-09-05T20:28:30.973116Z (mocktime: 2021-09-01T07:17:29Z) [net] [net.cpp:1323] [InactivityCheck] socket receive timeout: 393061s peer=0
  ```

  Fix that by skipping `InactivityCheck` via a large `-peertimeout`.

ACKs for top commit:
  fanquake:
    ACK fa676dbac8

Tree-SHA512: 061c0585a805aa2f8e55c4beedd4b8498a2951f33d60aa3632dda0a284db3a627d14a23dbd57e8a66c69a1612f39418e3a755c8ca97f6ae1105c0d70f0d1a801
2021-09-10 10:02:03 +02:00
fanquake
b8336b22d3
Merge bitcoin/bitcoin#22675: RBF move 2/3: extract RBF logic into policy/rbf
32748da0f4 whitespace fixups after move and scripted-diff (glozow)
fa47622e8d scripted-diff: rename variables in policy/rbf (glozow)
ac761f0a23 MOVEONLY: fee checks (Rules 3 and 4) to policy/rbf (glozow)
9c2f9f8984 MOVEONLY: check that fees > direct conflicts to policy/rbf (glozow)
3f033f01a6 MOVEONLY: check for disjoint conflicts and ancestors to policy/rbf (glozow)
7b60c02b7d MOVEONLY: BIP125 Rule 2 to policy/rbf (glozow)
f8ad2a57c6 Make GetEntriesForConflicts return std::optional (glozow)

Pull request description:

  This PR does not change behavior. It extracts the BIP125 logic into helper functions (and puts them in the policy/rbf* files). This enables three things - I think each one individually is pretty good:

  - Implementation of package RBF (see #22290). I want it to be as close to BIP125 as possible so that it doesn't become a distinct fee-bumping mechanism. Doing these move-only commits first means the diff is mostly mechanical to review, and I just need to create a function that mirrors the single transaction validation.
  - We will be able to isolate and test our RBF logic alone. Recently, there have been some discussions on discrepancies between our code and BIP125, as well as proposals for improving it. Generally, I think making this code more modular and de-bloating validation.cpp is probably a good idea.
  - Witness Replacement (replacing same-txid-different-wtxid when the witness is significantly smaller and therefore higher feerate) in a BIP125-similar way. Hopefully it can just be implemented with calls to the rbf functions (i.e. `PaysForRBF`) and an edit to the relevant mempool entries.

ACKs for top commit:
  mjdietzx:
    ACK 32748da0f4
  theStack:
    Code-review ACK 32748da0f4 πŸ“
  MarcoFalke:
    review ACK 32748da0f4 πŸ¦‡

Tree-SHA512: d89985c8b4b42b54861018deb89468e04968c85a3fb1113bbcb2eb2609577bc4fd9bf254593b5bd0e7ab059a0fa8192d1a903b00f77e6f120c7a80488ffcbfc0
2021-09-10 14:44:54 +08:00
fanquake
5446070418
Merge bitcoin/bitcoin#22911: [net] Minor cleanups to asmap
853c4edb70 [net] Remove asmap argument from CNode::CopyStats() (John Newbery)
9fd5618610 [asmap] Make DecodeAsmap() a utility function (John Newbery)
bfdf4ef334 [asmap] Remove SanityCheckASMap() from netaddress (John Newbery)
07a9eccb60 [net] Remove CConnman::Options.m_asmap (John Newbery)

Pull request description:

  These small cleanups to the asmap code are the first 4 commits from #22910. They're minor improvements that are independently useful whether or not 22910 is merged.

ACKs for top commit:
  naumenkogs:
    ACK 853c4edb70
  theStack:
    Concept and code-review ACK 853c4edb70 πŸ—ΊοΈ
  fanquake:
    ACK 853c4edb70

Tree-SHA512: 64783743182592ac165df6ff8d18870b63861e9204ed722c207fca6938687aac43232a5ac4d8228cf8b92130ab0349de1b410a2467bb5a9d60dd9a7221b3b85b
2021-09-10 14:04:16 +08:00
fanquake
b65341555c
Merge bitcoin/bitcoin#22926: doc: Set PYTHONUTF8=1 for functional tests on Windows
c427a5800b doc: Set PYTHONUTF8=1 for functional tests on Windows (Hennadii Stepanov)

Pull request description:

  The `PYTHONUTF8` environment variable is defined in [PEP 540](https://www.python.org/dev/peps/pep-0540/), and it is actually used in our CI: 5e3380b9f5/.cirrus.yml (L89)

  This PR documents such usage to avoid users' [errors](https://github.com/bitcoin/bitcoin/pull/22922#issuecomment-915511037).

ACKs for top commit:
  MarcoFalke:
    cr ACK c427a5800b

Tree-SHA512: 441b8cecfe47d548cfe403b0e1cd0aef25c1a70ff556434ead1f1e26372919931ac6f208a4ed6fd8dcca46e8709245e4fb06f95259a43c8e1221473ce1ee497b
2021-09-10 13:45:44 +08:00
pradumnasaraf
67c85bdb2f doc: Added hyperlink for doc/build 2021-09-09 19:53:12 +05:30
merge-script
d2dd1697ce
Merge bitcoin/bitcoin#22904: sync, log: inline lock contention logging macro to fix duration, improve BCLog::LogMsg()
f530202353 Make unexpected time type in BCLog::LogMsg() a compile-time error (Martin Ankerl)
bddae7e7ff Add util/types.h with ALWAYS_FALSE template (MarcoFalke)
498b323425 log, timer: improve BCLog::LogMsg() (Jon Atack)
8d2f847ed9 sync: inline lock contention logging macro to fix time duration (Jon Atack)

Pull request description:

  Follow-up to #22736.

  The first commit addresses the issue identified and reported by Martin Ankerl in https://github.com/bitcoin/bitcoin/pull/22736#discussion_r703019629 to fix the lock contention duration reporting.

  The next three commits make improvements to the timer code in `BCLog::LogMsg()` and add `util/types.h` with an `ALWAYS_FALSE` template, that springboard from https://github.com/bitcoin/bitcoin/pull/22736#discussion_r702747920 by Marco Falke.

ACKs for top commit:
  martinus:
    re-ACK f530202353. I ran a fully synced node for about a day. My node was mostly idle though so not much was going on. I [wrote a little script](https://github.com/martinus/bitcoin-stuff/blob/main/scripts/parse-debuglog-contention-single.rb) to parse the `debug.log` and summarize the output to see if anything interesting was going on, here is the result:
  theStack:
    ACK f530202353

Tree-SHA512: 37d093eac5590e1b5846ab5994d0950d71e131177d1afe4a5f7fcd614270f977e0ea117e7af788e9a74ddcccab35b42ec8fa4db3a3378940d4988df7d21cdaaa
2021-09-09 15:55:03 +02:00
fanquake
1d0c57a05c
Merge bitcoin/bitcoin#22914: util: remove libevent <= 2.0.18 back-compat code
6045a14642 util: remove libevent <= 2.0.18 back-compat code (fanquake)

Pull request description:

  Now that we require libevent >=2.0.21, remove backwards compatibility code for older versions.

ACKs for top commit:
  kristapsk:
    ACK 6045a14642

Tree-SHA512: 49a237ee3cef78b105f8ea91dc3e541fe700fe3a3d02a88f85ec91772068ffbe508dbe196a4d693399b2bcf903251b9bc2573f04cb8f2e21a2ea481f35bfde32
2021-09-09 21:54:27 +08:00
W. J. van der Laan
020c2b7609
Merge bitcoin/bitcoin#22923: test: Switch multiprocess to clang i686 build
fa309ee61c bench: Fix 32-bit compilation failure in addrman bench (MarcoFalke)
fae0295a79 ci: Switch multiprocess to i686 build (MarcoFalke)

Pull request description:

  Building for i686 with clang helps to catch bugs early for:
  * The OSS-Fuzz i686 clang libFuzzer build
  * The arm 32-bit native clang build

  Fixes  #22889

ACKs for top commit:
  hebasto:
    ACK fa309ee61c

Tree-SHA512: 581820d319aae2fcd4dd44979ee3d4164a575f0438476890aa2a7447f1392a5da26766cd6ab954530499b54f66eec2417bdeefdd7efb19bc27dd679cd2b9d0ce
2021-09-09 15:52:26 +02:00
merge-script
fac7181091
Merge bitcoin/bitcoin#22582: test: a test to check descendant limits
fa7db1cbf7 [test] checks descendants limtis for second generation Package descendants (ritickgoenka)

Pull request description:

  This PR adds a new functional test to test the new descendant limits for packages that were proposed in #21800.
   ```
  +----------------------+
  |                      |
  |         M1           |
  |        ^  ^          |
  |       M2   ^         |
  |      .      ^        |
  |     .        ^       |
  |    .          ^      |
  |   .            ^     |
  |  M24            ^    |
  |                  ^   |
  |                  P1  |
  |                  ^   |
  |                  P2  |
  |                      |
  +----------------------+
  ```

  This test is for checking a transaction to fail its descendant count limits because of a combination of mempool descendants, package direct descendants, and package indirect descendants.

  In this test,  P1 has M1 as a mempool ancestor, P2 has no in-mempool ancestors, but when combined P2 has M1 as an ancestor and M1 exceeds descendant_limits (23 in-mempool descendants + 2 in-package descendants, a total of 26 including itself)

ACKs for top commit:
  ryanofsky:
    Code review ACK fa7db1cbf7. Only were suggested changes since last review: simplifying test and dropping P3 transaction as John suggested, and adding assert_equal I suggested
  glozow:
    ACK fa7db1cbf7
  jnewbery:
    ACK fa7db1cbf7

Tree-SHA512: d1eb993550ac8ce31cbe42e17c6522a213ede66970d5d9391f31a116477ab5889fefa6ff2df6ceadd63a28c1be1ad893b0e8e449247e9ade2ca61dc636508d68
2021-09-09 15:42:12 +02:00
fanquake
6045a14642
util: remove libevent <= 2.0.18 back-compat code
Now that we require libevent >=2.0.21, remove backwards compatibility
code for older versions.
2021-09-09 21:37:42 +08:00
W. J. van der Laan
b05d3e76e7
Merge bitcoin/bitcoin#22079: zmq: Add support to listen on IPv6 addresses
e6998838e5 doc: Add IPv6 address to zmq example (nthumann)
8abe5703a9 test: Add IPv6 test to zmq (nthumann)
ded449b726 zmq: Enable IPv6 on listening socket (nthumann)

Pull request description:

  This PR adds support for listening on IPv6 addresses with bitcoinds ZMQ interface, just like the RPC server.
  Currently, it is not possible to specify an IPv6 address, as the `ZMQ_IPV6` [socket option](http://api.zeromq.org/master:zmq-setsockopt#toc27) is not set and therefore the ZMQ initialization fails, if one does so. The absence of this option has also been noted [here](https://github.com/bitcoin/bitcoin/issues/15198#issuecomment-617378512).
  With this PR one can e.g. set `-zmqpubhashblock=tcp://[::1]:28333` to listen on the IPv6 loopback address.

ACKs for top commit:
  laanwj:
    Code review ACK e6998838e5
  theStack:
    Tested ACK e6998838e5 🌱

Tree-SHA512: 43c3043d8d5c79794d475926259c1be975b694db4fcc1f7750a9a28e242f0fa1b531735a63ea5777498003aa5834f6243f39742d0f3941f2f37593d0c7890700
2021-09-09 15:37:13 +02:00
merge-script
a5d00d4baf
Merge bitcoin/bitcoin#22788: scripted-diff: Use generate* from TestFramework
fa0b916971 scripted-diff: Use generate* from TestFramework (MarcoFalke)

Pull request description:

  This is needed for #22567.

  By using the newly added `generate*` member functions of the test framework, it paves the way to make it easier to implicitly call `sync_all` after block generation to avoid intermittent issues.

ACKs for top commit:
  jonatack:
    ACK fa0b916971

Tree-SHA512: e74a324b60250a87c08847cdfd7b6ce3e1d89b891659fd168f6dd7dc0aa718d0edd28285374a613f462f34f4ef8e12c90ad44fb58721c91b2ea691406ad22c2a
2021-09-09 14:02:45 +02:00
MarcoFalke
fa676dbac8
test: pep-8 whitespace 2021-09-09 13:58:46 +02:00
MarcoFalke
faed284eab
test: Avoid intermittent test failure in feature_csv_activation.py 2021-09-09 13:58:00 +02:00
MarcoFalke
eb1f5706df
Merge bitcoin/bitcoin#22925: test: Add missing suppression signed-integer-overflow:addrman.cpp
facb534c37 test: Add missing suppression signed-integer-overflow:addrman.cpp (MarcoFalke)

Pull request description:

  Steps to reproduce:

  [crash-d5f88bd8d0d460ffbab217b856b8582600c00503.log](https://github.com/bitcoin/bitcoin/files/7130854/crash-d5f88bd8d0d460ffbab217b856b8582600c00503.log)

  ```
  $ FUZZ=addrman ./src/test/fuzz/fuzz ./crash-d5f88bd8d0d460ffbab217b856b8582600c00503.log
  INFO: Running with entropic power schedule (0xFF, 100).
  INFO: Seed: 1257085025
  INFO: Loaded 1 modules   (379531 inline 8-bit counters): 379531 [0x562577b768a8, 0x562577bd3333),
  INFO: Loaded 1 PC tables (379531 PCs): 379531 [0x562577bd3338,0x56257819dbe8),
  ./src/test/fuzz/fuzz: Running 1 inputs 1 time(s) each.
  Running: ./crash-d5f88bd8d0d460ffbab217b856b8582600c00503.log
  addrman.cpp:80:14: runtime error: signed integer overflow: 2105390 - -9223372036854775808 cannot be represented in type 'long'
      #0 0x5625752f0179 in CAddrInfo::IsTerrible(long) const addrman.cpp:80:14
      #1 0x56257531917d in CAddrMan::GetAddr_(std::vector<CAddress, std::allocator<CAddress> >&, unsigned long, unsigned long, std::optional<Network>) const addrman.cpp:874:16
      #2 0x562574f0251b in CAddrMan::GetAddr(unsigned long, unsigned long, std::optional<Network>) const ./addrman.h:259:9
      #3 0x562574eff7ad in addrman_fuzz_target(Span<unsigned char const>) test/fuzz/addrman.cpp:295:26

  SUMMARY: UndefinedBehaviorSanitizer: signed-integer-overflow addrman.cpp:80:14 in

ACKs for top commit:
  practicalswift:
    cr ACK facb534c37

Tree-SHA512: 6368c48be8762c793f760d86caaf37a10caffa08f6903f3667dd08f7f67fade10f385fbffc451ddcbeeecc9fd02526ed97ab9de13398a75fffa55976a99af6b9
2021-09-09 10:27:39 +02:00
fanquake
17e27dd000
Merge bitcoin/bitcoin#22912: ci: Fix merge_script in MSVC task
f78cc90524 ci: Fix merge_script in MSVC task (Hennadii Stepanov)

Pull request description:

  The new `merge_script` in the MSVC build task does not really exit early when the task is triggered by a non-pr.

  In the current code e4aa9b15b9/.cirrus.yml (L104)

  the `exit 0` command exits from the PowerShell call, not the recent `merge_script`. This cause the next lines e4aa9b15b9/.cirrus.yml (L105-L107) are executed unconditionally.

  Here is an excerpt from [CI task log](https://api.cirrus-ci.com/v1/task/4578647416766464/logs/merge.log) for the ["Merge #22915: Remove confusing CAddrDB " commit](896649996b):
  ```
  ...
  C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build>call powershell.exe -NoLogo -EncodedCommand ZwBpAHQAIAByAGUAcwBlAHQAIAAtAC0AaABhAHIAZAA=
  HEAD is now at 896649996 Merge bitcoin/bitcoin#22915: Remove confusing CAddrDB

  C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build>if 0 NEQ 0 exit /b 0

  C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build>call powershell.exe -NoLogo -EncodedCommand aQBmACAAKAAkAGUAbgB2ADoAQwBJAFIAUgBVAFMAXwBQAFIAIAAtAGUAcQAgACQAbgB1AGwAbAApACAAewAgAGUAeABpAHQAIAAwADsAIAB9AA==

  C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build>if 0 NEQ 0 exit /b 0

  C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build>call powershell.exe -NoLogo -EncodedCommand ZwBpAHQAIABmAGUAdABjAGgAIAAkAGUAbgB2ADoAQwBJAFIAUgBVAFMAXwBSAEUAUABPAF8AQwBMAE8ATgBFAF8AVQBSAEwAIAAkAGUAbgB2ADoAQwBJAFIAUgBVAFMAXwBCAEEAUwBFAF8AQgBSAEEATgBDAEgA
  From https://github.com/bitcoin/bitcoin
   * branch                HEAD       -> FETCH_HEAD

  C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build>if 0 NEQ 0 exit /b 0

  C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build>call powershell.exe -NoLogo -EncodedCommand ZwBpAHQAIABtAGUAcgBnAGUAIABGAEUAVABDAEgAXwBIAEUAQQBEAA==
  Already up to date.

  C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build>if 0 NEQ 0 exit /b 0
  ```

  This PR fixes this issue, and makes `merge_script` log more readable.

ACKs for top commit:
  MarcoFalke:
    Concept ACK f78cc90524

Tree-SHA512: c88b115f99f9019a4100a10df051e32c05487612c13105d10873b9cf38965eeca731604d36610ae750cb1f93ba77ce97dca7599fe4984181210d0753be4eb9a0
2021-09-09 16:08:48 +08:00
MarcoFalke
fa55c3dc1b
Raise InitError when peers.dat is invalid or corrupted 2021-09-09 09:20:43 +02:00
MarcoFalke
fa4e2ccfd8
Inline ReadPeerAddresses
No need to have a function that is only called in one place
2021-09-09 09:12:12 +02:00
MarcoFalke
fa5aeec80c
Move LoadAddrman from init to addrdb
Init should only concern itself with the initialization order, not the
detailed initialization logic of every module.

Also, inlining logic into a method that is ~800 lines of code, makes it
impossible to unit test on its own.
2021-09-09 09:11:41 +02:00
MarcoFalke
fa309ee61c
bench: Fix 32-bit compilation failure in addrman bench 2021-09-09 08:30:53 +02:00
MarcoFalke
e4aa9b15b9
Merge bitcoin/bitcoin#22922: ci: Fix and enable tests on Windows
fa0c194db3 cirrus: Enable tests on windows (MarcoFalke)
fadecbd9a4 test: Fix tests on Windows (MarcoFalke)

Pull request description:

  Only a cherry-picked list. `--extended` can be enabled in a follow-up.

ACKs for top commit:
  hebasto:
    ACK fa0c194db3, tested locally on Windows 10 Pro 20H2 (build 19042.1165):

Tree-SHA512: 47cfbcef7ce5fe0c62b77a1e45ace513c4f0109b1fcfaec94faf9e488fe9430d6ba0e852230021d432847eb1389a4e4b7cf39bf17f7b09bae36af3079e0d7399
2021-09-09 08:24:14 +02:00
MarcoFalke
896649996b
Merge bitcoin/bitcoin#22915: Remove confusing CAddrDB
fade9a1a4d Remove confusing CAddrDB (MarcoFalke)
fa7f77b7d1 Fix addrdb includes (MarcoFalke)
fa3f5d0dae Move addrman includes from .h to .cpp (MarcoFalke)

Pull request description:

  Split out from #22762 to avoid having to carry it around in (an)other rebase(s)

ACKs for top commit:
  ryanofsky:
    Code review ACK fade9a1a4d
  lsilva01:
    Code Review ACK fade9a1a4d

Tree-SHA512: 7615fb0b6235d0c1e6f8cd6263dd18c4d95890567c2b797fe6fce6cb12cc85ce6eacbe07dbb6d81b05d179ef03b42edfd61c940e35a1044ce6d363b54c2dae5c
2021-09-09 08:09:39 +02:00
fanquake
8805e06663
Merge bitcoin/bitcoin#22390: system: skip trying to set the locale on NetBSD
fdd71448e7 system: skip trying to set the locale on NetBSD (fanquake)

Pull request description:

  Just treat it the same as the other BSDs.

  Fixes #17379.

ACKs for top commit:
  laanwj:
    Code review ACK fdd71448e7
  practicalswift:
    cr ACK fdd71448e7

Tree-SHA512: 5fe0a66f014279ad2683b548692a36af493377fb92d1f28b15dc4feef871190fe08ef40dcc4f5ba21a525fe365c42fb429fe4be0673a1e96db163af587c23204
2021-09-09 13:51:02 +08:00
fanquake
da67b75c5c
Merge bitcoin/bitcoin#22903: Enable clang-tidy bugprone-argument-comment and fix violations
fa57fa1a2e Enable clang-tidy bugprone-argument-comment and fix violations (MarcoFalke)

Pull request description:

  Named arguments can be dangerous when they are wrong, because they are not enforced by the compiler. Currently there are only minor typos, no actual bugs.

  Fix the typos and add the `.clang-tidy` file to make it easier to find them in the future.

ACKs for top commit:
  practicalswift:
    cr ACK fa57fa1a2e
  fanquake:
    ACK fa57fa1a2e

Tree-SHA512: b66f01e0a1e77e56ed8454002176df660cc2cc0947a90785aa33cc5b8003a1f99fd8b2f8f89f2a0bf180ff2c42c031d69e669d127bb557b879c17975275a220b
2021-09-09 11:33:58 +08:00
Hennadii Stepanov
c427a5800b
doc: Set PYTHONUTF8=1 for functional tests on Windows 2021-09-09 00:19:46 +03:00
MarcoFalke
fa0c194db3
cirrus: Enable tests on windows 2021-09-08 20:43:23 +02:00
MarcoFalke
fae0295a79
ci: Switch multiprocess to i686 build 2021-09-08 20:17:04 +02:00
MarcoFalke
facb534c37
test: Add missing suppression signed-integer-overflow:addrman.cpp 2021-09-08 19:43:42 +02:00
MarcoFalke
fadecbd9a4
test: Fix tests on Windows 2021-09-08 18:58:31 +02:00
MarcoFalke
5e3380b9f5
Merge bitcoin/bitcoin#22916: doc: add missing copyright header to getuniquepath.cpp
69a439b880 doc: add missing copyright header to getuniquepath.cpp (fanquake)

Pull request description:

  This was missed in #21052.

ACKs for top commit:
  hebasto:
    ACK 69a439b880, but a scripted-diff using `copyright_header.py insert` looks preferable.

Tree-SHA512: 1a75ffd93fa8e5e83821e1fe984353422740ebf9e203dc873debf4dffec0e23f55a1e31f806dd2d66087d3620f6dc447af69f9124f0bcc6676ef91ee35374832
2021-09-08 10:57:47 +02:00
fanquake
69a439b880
doc: add missing copyright header to getuniquepath.cpp
This was missed in #21052.
2021-09-08 16:28:21 +08:00
fanquake
7d7d5e8efd
Merge bitcoin/bitcoin#22879: addrman: Fix format string in deserialize error
fab0b55cf0 addrman: Fix format string in deserialize error (MarcoFalke)
facce4ca44 test: Remove useless overwrite (MarcoFalke)

Pull request description:

  The format string is evaluated differently on modern compilers (clang 10 and later, as well as gcc 10 and later).

  Work around the behaviour change in compilers by pinning the underlying type of the format arguments.

  Can be tested by observing a failing test when running against master compiled with clang 10 or gcc 10 (or later).

ACKs for top commit:
  jonatack:
    ACK fab0b55cf0 verified the test fails on master as expected only at line 61 (assertion fixed by the code change); the last two test additions pass as expected
  mzumsande:
    ACK fab0b55cf0

Tree-SHA512: 07462901435107f3bc79098fd7d06446bfe8fe065fffdd35adfcba8f1dd3c499575006557afe7bc74b79d690c5ef7b58e3e031e908161be5529cf237e3b30609
2021-09-08 15:17:42 +08:00
Hennadii Stepanov
f78cc90524
ci: Fix merge_script in MSVC task 2021-09-07 20:30:54 +03:00
Martin Ankerl
f530202353
Make unexpected time type in BCLog::LogMsg() a compile-time error 2021-09-07 19:19:31 +02:00
MarcoFalke
bddae7e7ff
Add util/types.h with ALWAYS_FALSE template 2021-09-07 19:19:02 +02:00
MarcoFalke
ecf580e40f
Merge bitcoin/bitcoin#22899: ci: Build and cache static Qt instead of downloading a pre-built one
3a68546fd0 ci: Build and cache static Qt instead of downloading a pre-built one (Hennadii Stepanov)

Pull request description:

  This PR makes the MSVC build CI task free of [pre-built static Qt binaries](https://github.com/sipsorcery/qt_win_binary/releases). It uses the approach which is documented in #22890.

  It takes about 13 minutes to build a static Qt dependency (for 8 CPUs):

  ![Screenshot from 2021-09-06 08-59-08](https://user-images.githubusercontent.com/32963518/132167857-bce49c74-f258-4468-b45b-75d0cf3c670c.png)

  with the maximum total time:

  ![Screenshot from 2021-09-06 08-59-26](https://user-images.githubusercontent.com/32963518/132167881-b84bd4de-38cc-4cb1-b9f7-35642cbea8cc.png)

  There is an additional benefit of this PR. It is no longer required to build a new static Qt package when a CI Windows image upgrades its building tools, and breaks the compatibility with the recent Qt package.

ACKs for top commit:
  sipsorcery:
    utACK 3a68546fd0.

Tree-SHA512: 2cf358ccecb26293b52c04158d6d3366ae6257cc3c04262e02234f7d7a03086885c67f0aad5702fcaa6f035fe4a09967a81245c561614875ecd2e90e2e00bbaa
2021-09-07 17:48:01 +02:00
John Newbery
853c4edb70 [net] Remove asmap argument from CNode::CopyStats()
This saves passing around a reference to the asmap std::vector<bool>.
2021-09-07 15:24:14 +01:00
John Newbery
9fd5618610 [asmap] Make DecodeAsmap() a utility function
DecopeAsmap is a pure utility function and doesn't have any
dependencies on addrman, so move it to util/asmap.

Reviewer hint: use:

`git diff --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space`
2021-09-07 15:24:00 +01:00
Hennadii Stepanov
3a68546fd0
ci: Build and cache static Qt instead of downloading a pre-built one 2021-09-07 16:49:35 +03:00
John Newbery
bfdf4ef334 [asmap] Remove SanityCheckASMap() from netaddress
SanityCheckASMap(asmap, bits) simply calls through to SanityCheckASMap(asmap)
in util/asmap. Update all callers to simply call that function.
2021-09-07 13:31:10 +01:00
MarcoFalke
e0ca5d0513
Merge bitcoin/bitcoin#22909: ci: Add missed comments and test_bitcoin.exe command line option
64015eb014 ci: Add missed comments and test_bitcoin.exe command line option (Hennadii Stepanov)

Pull request description:

  This PR is a #21551 follow up, and it:
  - adds missed comments, see https://github.com/bitcoin/bitcoin/pull/21551#discussion_r703342550
  - restores missed `-l test_suite` command line option for `test_bitcoin.exe`, see https://github.com/bitcoin/bitcoin/pull/21551#discussion_r703348955

ACKs for top commit:
  MarcoFalke:
    cr ACK 64015eb014

Tree-SHA512: ad1c91544da39a94f033bc55ae5fdaf5774475702edd026635389e68d20e2608cb599dd51f3c1412e0287beef073352e48d9ec005c94df38cfe4fe2d21a94fe3
2021-09-07 13:21:33 +02:00
Hennadii Stepanov
64015eb014
ci: Add missed comments and test_bitcoin.exe command line option 2021-09-07 13:31:28 +03:00
MarcoFalke
e7c6ed605c
Merge bitcoin/bitcoin#21551: ci: Move Windows MSVC build from AppVeyor to Cirrus
97292b1914 ci: Drop AppVeyor CI integration (Hennadii Stepanov)
1fb70793b2 ci: Add Windows task to Cirrus CI (Hennadii Stepanov)

Pull request description:

  This PR:
  - gets rid off unreliable AppVeyor CI
  - places all CI configs in one place
  - allows to enable functional tests in the future (using a persistent worker)

  | no populated `vcpkg` cache | populated `vcpkg` cache |
  |---|---|
  | ![Screenshot from 2021-09-02 15-47-04](https://user-images.githubusercontent.com/32963518/131846156-9367bffc-9093-40ca-98c3-15db74e24113.png) | ![Screenshot from 2021-09-02 14-06-26](https://user-images.githubusercontent.com/32963518/131833053-a501454d-eecf-463c-a3a4-b89d2a494058.png) |

  Currently, AppVeyor builds take about 44..48 minutes.

ACKs for top commit:
  sipsorcery:
    re-ACK 97292b1914.

Tree-SHA512: 3af50d9fd68eb12f39724810dacf948e4068573b5dfd0dbaeb05d19d4bd6f10bd9a432656dcc32b742684b438d31305eace85c602296d7a1bf84b2f1fcc06f02
2021-09-07 11:20:42 +02:00
John Newbery
07a9eccb60 [net] Remove CConnman::Options.m_asmap
This data member was introduced in ec45646de9 but never used.
2021-09-07 10:14:50 +01:00
MarcoFalke
fade9a1a4d
Remove confusing CAddrDB
The class only stores the file path, reading it from a global. Globals
are confusing and make testing harder.

The method reading from a stream does not even use any class members, so
putting it in a class is also confusing.
2021-09-07 11:05:16 +02:00
MarcoFalke
fa7f77b7d1
Fix addrdb includes 2021-09-07 10:44:48 +02:00
MarcoFalke
fa3f5d0dae
Move addrman includes from .h to .cpp
This is a follow-up to the code move in commit a820e79512
2021-09-07 10:44:43 +02:00