Commit Graph

28235 Commits

Author SHA1 Message Date
Carl Dong
98c4e252f0 node/ifaces: NodeImpl: Use an accessor for ChainMan 2021-03-30 13:52:22 -04:00
Carl Dong
7e8b5ee814 validation: Make BlockManager::LookupBlockIndex const 2021-03-30 13:52:22 -04:00
Carl Dong
88aead263c node: Avoid potential UB by asserting assumptions 2021-03-30 13:52:22 -04:00
Carl Dong
1dd8ed7a84 net_processing: Move comments to declarations
Also:
- Remove extraneous blank line
2021-03-30 13:52:22 -04:00
Carl Dong
07156eb387 node/coinstats: Replace #include with fwd-declaration 2021-03-24 15:40:56 -04:00
Carl Dong
7b8e976cd5 miner: Add chainstate member to BlockAssembler 2021-03-24 15:40:56 -04:00
Carl Dong
e62067e7bc Revert "miner: Pass in chainstate to BlockAssembler::CreateNewBlock"
This reverts commit d0de61b764.
2021-03-24 15:40:56 -04:00
Carl Dong
eede0647b0 Revert "scripted-diff: Invoke CreateNewBlock with chainstate"
This reverts commit 46b7f29340.
2021-03-24 15:40:56 -04:00
Carl Dong
0c1b2bc549 Revert "miner: Remove old CreateNewBlock w/o chainstate param"
This reverts commit 2afcf24408.
2021-03-24 15:40:56 -04:00
MarcoFalke
ed49203daa
Merge #21357: test: Unconditionally check for fRelay field in test framework
39a9ec579f Unconditionally check for fRelay field in test framework (Troy Giorshev)

Pull request description:

  picking up #20411 (rebased onto master)

  There is a discrepancy in the implementation of our p2p protocol between
  bitcoind and the testing framework.  The fRelay field is an optional
  field at the end of a version message as of protocol version 70001.
  However, when deserializing a message in bitcoind, we don't check the
  version to see if it should have an fRelay field or not.  Instead, we
  unconditionally attempt to deserialize into the field.

  This commit brings the testing framework in line with the implementation
  in core.

  This matters for a version message with the following fields:

  Version = 60000
  fRelay = 1

  Bitcoind would deserialize this into a version message with
  Version=60000 and fRelay=1, whereas (before this commit) our testing
  framework would deserialize this into a version message with
  Version=60000 and fRelay=0.

ACKs for top commit:
  jnewbery:
    utACK 39a9ec579f

Tree-SHA512: 13a23f1180b7121ba41cb85baa38094b41f4607a7c88b3384775177cb116e76faf5514760624f98a4e8a830767407c46753a7e0285158c33e0c6ce395de8f15c
2021-03-24 19:28:24 +01:00
Wladimir J. van der Laan
23b15601df
Merge #17227: Qt: Add Android packaging support
246774e264 depends: fix Qt precompiled headers bug (Igor Cota)
8e7ad4146d depends: disable Qt Vulkan support on Android (Igor Cota)
ba46adaa1a CI: add Android APK build to cirrus (Igor Cota)
7563720e30 CI: add Android APK build script (Igor Cota)
ebfb10cb75 Qt: add Android packaging support (Igor Cota)

Pull request description:

  ![bitcoin-qt](https://user-images.githubusercontent.com/762502/67396157-62f3d000-f5a7-11e9-8a6f-9425823fcd6c.gif)
  This PR is the third and final piece of the basic Android support puzzle - it depends on https://github.com/bitcoin/bitcoin/pull/16110 and is related to https://github.com/bitcoin/bitcoin/pull/16883. It introduces an `android` directory under `qt` and a simple way to build an Android package of `bitcoin-qt`:

  1. Build depends for Android as described in the [README](https://github.com/bitcoin/bitcoin/blob/master/depends/README.md)
  2. Configure with one of the resulting prefixes
  3. Run `make && make apk` in `src/qt`

  The resulting APK files will be in `android/build/outputs/apk`. You can install them manually or with [adb](https://developer.android.com/studio/command-line/adb). One can also open the `android` directory in Android Studio for that integrated development and debugging experience. `BitcoinQtActivity` is your starting point.

  Under the hood makefile `apk` target:

  1. Renames the `bitcoin-qt` binary to `libbitcoin-qt.so` and copies it over to a folder under `android/libs` depending on which prefix and corresponding [ABI](https://developer.android.com/ndk/guides/abis.html#sa) `bitcoin-qt` was built for
  2. Takes `libc++_shared.so` from the Android NDK and puts in the same place. It [must be included](https://developer.android.com/ndk/guides/cpp-support) in the APK
  3. Extracts Qt for Android Java support files from the `qtbase` archive in `depends/sources` to `android/src`

  There is also just a tiny bit of `ifdef`'d code to make the Qt Widgets menus usable. It's not pretty but it works and is a stepping stone towards https://github.com/bitcoin/bitcoin/pull/16883.

ACKs for top commit:
  MarcoFalke:
    cr ACK 246774e264
  laanwj:
    Code review ACK 246774e264

Tree-SHA512: ba30a746576a167545223c35a51ae60bb0838818779fc152c210f5af1413961b2a6ab6af520ff92cbc8dcd5dcb663e81ca960f021218430c1f76397ed4cead6c
2021-03-24 19:02:01 +01:00
MarcoFalke
b1281b5d8f
Merge #21516: remove unnecessary newline from initWarning() argument
804ac10631 remove unnecessary newline from initWarning() argument (Larry Ruane)

Pull request description:

  Run: `src/bitcoind -wallet=nosuchfile`

  Without this patch, `debug.log` contains:
  ```
  2021-03-23T21:19:16Z init message: Verifying wallet(s)...
  2021-03-23T21:19:16Z Warning: Skipping -wallet path that doesn't exist. Failed to load database path '/home/larry/.bitcoin/wallets/nosuchfile'. Path does not exist.

  2021-03-23T21:19:16Z init message: Loading banlist...
  ```
  With this patch, the empty line isn't present. This PR fixes a similar problem with `src/bitcoind -conf=nosuchfile`

ACKs for top commit:
  practicalswift:
    cr ACK 804ac10631: patch looks correct!
  jarolrod:
    tACK 804ac10631, nice catch!
  theStack:
    Code-review ACK 804ac10631

Tree-SHA512: dfcbaaa72ca24ac40233ac56840cfba8827853711d3df6e229ce940686f2ebf8bf0560bafcaa73a4d82d179a5050af0d3cabdc47b3b1dfd6aaadf718a6635f11
2021-03-24 18:50:51 +01:00
Larry Ruane
804ac10631 remove unnecessary newline from initWarning() argument 2021-03-24 04:31:48 -06:00
fanquake
f67b5dca57
Merge #20734: build: Make platform-specific targets available for proper platform builds only
3d31abbaaa build: Make Windows-specific targets available for Windows builds only (Hennadii Stepanov)
92990e25b7 build: Make macOS-specific targets available for macOS builds only (Hennadii Stepanov)

Pull request description:

  On master (f1dbf92ff0) it is possible to point `make` to macOS and Windows specific targets even the build system is configured to build for Linux platforms:
  ```
  $ make Bitcoin-Core.dmg
  ...
  $ make bitcoin-21.99.0-win64-setup
  ...
  ```

  Such behavior makes no sense, and it is confused. Fixed in this PR.

ACKs for top commit:
  fanquake:
    ACK 3d31abbaaa - tested that nonsensical targets are no longer available. i.e

Tree-SHA512: bbd8450bf98fbccb0b828df2f753ed0dbbd203defa2f58ce21390ee2ea183c95d8ff585d62d52be870dbf0158e2bb0fbd47eda026b80174ee6fd617473f5ac03
2021-03-24 16:52:17 +08:00
MarcoFalke
7ce7ce5716
Merge #21338: test: add functional test for anchors.dat
581791c620 test: add functional test for anchors.dat (bruno)

Pull request description:

  This PR adds a functional test for anchors.dat.

  It creates a node and adds 2 outbound block-relay-only connections and 5 inbound connections.
  When the node is down, anchors.dat should contain the 2 addresses from the outbound block-relay-only connections.

ACKs for top commit:
  MarcoFalke:
    Concept ACK 581791c620
  hebasto:
    ACK 581791c620

Tree-SHA512: 77038b09e36ee5ae473a26d6f566c0ed283af258c34df8486706a24f72b05abab621a293ac886d03849bc45bc28be7336137252225b25aff393baa6b5238688c
2021-03-24 08:27:03 +01:00
fanquake
f95071a3f5
Merge #21489: fuzz: cleanups for versionbits fuzzer
aa7f418fe3 fuzz: cleanups for versionbits fuzzer (Anthony Towns)

Pull request description:

  Followups for #21380, shouldn't change coverage. Marking as draft to avoid introducing conflicts for the speedy trial PRs.

ACKs for top commit:
  MarcoFalke:
    cr ACK aa7f418fe3
  practicalswift:
    Tested ACK aa7f418fe3

Tree-SHA512: 6792364e3bb036cc903b4a5f5805d00afceeae475ce84660da962d28335bd98e59d5f45e68718657d3aa526123e351edadda39e99e49f1c6cfab629e98df35ed
2021-03-24 14:15:35 +08:00
Troy Giorshev
39a9ec579f Unconditionally check for fRelay field in test framework
There is a discrepancy in the implementation of our p2p protocol between
bitcoind and the testing framework.  The fRelay field is an optional
field at the end of a version message as of protocol version 70001.
However, when deserializing a message in bitcoind, we don't check the
version to see if it should have an fRelay field or not.  Instead we
unconditionally attempt to deserialize into the field.

This commit brings the testing framework in line with the implementation
in core.

This matters for a version message with the following fields:

Version = 60000
fRelay = 1

Bitcoind would deserialize this into a version message with
Version=60000 and fRelay=1, whereas (before this commit) our testing
framework would deserialize this into a version message with
Version=60000 and fRelay=0.
2021-03-23 19:57:17 -04:00
Wladimir J. van der Laan
fa2a5b8f3a
Merge #20421: build: miniupnpc 2.2.2
180dc3c886 build: miniupnpc 2.2.2 (fanquake)

Pull request description:

  Creating the dll subdir is no-longer required.
  We can drop our wingen patch.

  One issue that came up in [#19867](https://github.com/bitcoin/bitcoin/pull/19867#discussion_r483516359):
  > unrelated to this change but: why are we inserting the architecture in here, seems like something not necessary to reveal

  > My assumption is that it was being inserted to make depends more deterministic. However I think we can improve this, as there's no reason to reveal more of the version information either. Could leave the version as is /2.0 and either drop the architecture, or insert something else?

  I've dropped our `sed` and added a patch that just removes the OS string and miniupnpc version from the User-Agent. i.e:
  ```bash
  # master
  strings depends/x86_64-apple-darwin19.6.0/lib/libminiupnpc.a | rg -i User-Agent
  User-Agent: x86_64-apple-darwin19.6.0, UPnP/1.1, MiniUPnPc/2.0.20180203
  User-Agent: x86_64-apple-darwin19.6.0, UPnP/1.1, MiniUPnPc/2.0.20180203

  # this PR
  strings depends/x86_64-apple-darwin19.6.0/lib/libminiupnpc.a | rg -i User-Agent
  User-Agent: UPnP/1.1
  User-Agent: UPnP/1.1
  ```

  Note that built unmodified (22c1386351), the User-Agent would be:
  ```bash
  strings libminiupnpc.dylib | rg User-Agent
  User-Agent: Darwin/19.6.0, UPnP/1.1, MiniUPnPc/2.2.0
  User-Agent: Darwin/19.6.0, UPnP/1.1, MiniUPnPc/2.2.0
  ```

ACKs for top commit:
  laanwj:
    Code review ACK 180dc3c886
  hebasto:
    ACK 180dc3c886.

Tree-SHA512: b0b6e623dbc5499e28faedf992d84278d6a11887a45a3806957b9e08886c5e56044cdfa2e7d7ec81cb1dd55f89be99834367905315d6bc611ba530e91d889ad1
2021-03-23 21:06:41 +01:00
MarcoFalke
681c21be9a
Merge #21512: fuzz: Fix tx_pool target to properly fuzz immature outpoints
fac921f23f fuzz: Fix tx_pool target to properly fuzz immature outpoints (MarcoFalke)
fa2b95f861 fuzz: Style fixups (MarcoFalke)

Pull request description:

  Also includes a commit for minor style fixups

ACKs for top commit:
  glozow:
    utACK fac921f23f this fixes it 👍

Tree-SHA512: 1575ba115b2009b653921511c163bd846cd381d6fc92b04a899c0686d23a02bdcdd95c81776b515b80ae187bcec3ccaca3aa88fcecbec888f73ca2d875eef506
2021-03-23 16:04:31 +01:00
MarcoFalke
837e59eff6
Merge bitcoin-core/gui#248: Fix: For values of "Bytes transferred" and "Bytes/s" with 1000-based prefix names use 1000-based divisor instead of 1024-based
d09ebc4723  Fix wrong(1024) divisor for 1000-based prefixes (wodry)

Pull request description:

  v.0.21.0

  I saw in the GUI peer window in the "received" column `1007 KB`, and after increasing to >=1024 I guess, it switched to `1 MB`. I would have expected the display unit to change from KB to MB already at value >=1000.

  I looked into the code, and the values appear to be power-of-2 byte values, so the switching at >=1024 and not >=1000 seems correct.
  But the unit display is not precisely correct, binary prefixes should be used for power-of-2 byte values.

  To be correct, this PR changes ~~KB/MB/GB to KiB/MiB/GiB.~~ KB to kB and the divisor from 1024 to 1000.

ACKs for top commit:
  hebasto:
    ACK d09ebc4723, tested on Linux Mint 20.1 (Qt 5.12.8) the both "Network Traffic" and "Peers" tabs of the "Node Window".
  jarolrod:
    ACK d09ebc4723
  leonardojobim:
    Tested ACK d09ebc4723 on Ubuntu 20.04 Qt 5.12.8

Tree-SHA512: 8f830b08cc3fd36dc8a18f1192959fe55d1644938044bf31d770f7c3bf8475fba6da5019a2d2024d5b2c81a8dab112f360c555367814a14f4d05c89d130f25b0
2021-03-23 15:57:58 +01:00
fanquake
3c87dbe95c
Merge #21497: build: Do not opt-in unused CoreWLAN stuff in depends for macOS
810b1310d6 build: Do not build unused CoreWLAN stuff in depends for macOS (Hennadii Stepanov)

Pull request description:

  We [do not use](d2a78ee928/contrib/devtools/symbol-check.py (L96-L111)) any macOS CoreWLAN Framework stuff.

  Changes in Qt Configure summary with `HOST=x86_64-apple-darwin18`:
  ```diff
  --- wlan-master/summary2021-03-22 00:26:04.377387806 +0200
  +++ wlan-pr/summary2021-03-22 00:37:07.060997990 +0200
  @@ -49,7 +49,7 @@
       slog2 ................................ no
     Using system PCRE2 ..................... no
   Qt Network:
  -  CoreWLan ............................... yes
  +  CoreWLan ............................... no
     getifaddrs() ........................... yes
     IPv6 ifname ............................ yes
     libproxy ............................... no
  ```

ACKs for top commit:
  fanquake:
    ACK 810b1310d6 - Only obvious difference I could see in the build is skipping a configure check.

Tree-SHA512: 54e177c4ad528ef48cc80c3a39ab1b66267dd0ca4fe6cc4f70579c87b74051a04ebeeca1a26afee7fc29f750af456804578abbe7e8a9ad2717297291f206547e
2021-03-23 19:59:09 +08:00
MarcoFalke
55ceaeb8c4
Merge #18030: doc: Coin::IsSpent() can also mean never existed
1404c57403 [doc] Coin: explain that IsSpent() can also mean never existed (Sjors Provoost)

Pull request description:

  This can be especially confusing where `AccessCoin()` is used with logic like this:

  ```c++
      while (iter.n < MAX_OUTPUTS_PER_BLOCK) {
          const Coin& alternate = view.AccessCoin(iter);
          if (!alternate.IsSpent()) return alternate;
  ```

ACKs for top commit:
  practicalswift:
    ACK 1404c57403
  MarcoFalke:
    ACK 1404c57403
  jnewbery:
    utACK 1404c57403

Tree-SHA512: 418618dd7e08bd5cc8360e3501d0f57e34100e5101ad3b8e0a819923fa860f44c7f2fada0f8447a1af3c2601fd72bfe619b91ff2f26f7133ceaeb0c98b017b12
2021-03-23 11:11:02 +01:00
MarcoFalke
fac921f23f
fuzz: Fix tx_pool target to properly fuzz immature outpoints 2021-03-23 10:58:36 +01:00
MarcoFalke
fa2b95f861
fuzz: Style fixups 2021-03-23 10:58:32 +01:00
MarcoFalke
fd2b22bf24
Merge #21142: fuzz: Add tx_pool fuzz target
faa9ef49d1 fuzz: Add tx_pool fuzz targets (MarcoFalke)

Pull request description:

ACKs for top commit:
  AnthonyRonning:
    reACK faa9ef49d1
  practicalswift:
    Tested ACK faa9ef49d1
  glozow:
    code review ACK faa9ef49d1, a bunch of comments but non blocking

Tree-SHA512: 8d404398faa46d8e7bf93060a2fe9afd5c0c2bd6e549ff6588d2f3dd1b912dff6c5416d5477c18edecc2e85b00db4fdf4790c3e6597a5149b0d40c9d5014d82f
2021-03-23 09:59:40 +01:00
MarcoFalke
d400e672a0
Merge #21487: fuzz: Use ConsumeWeakEnum in addrman for service flags
55554463c1 fuzz: Use ConsumeWeakEnum in addrman for service flags (MarcoFalke)

Pull request description:

  This has minimally better performance. Reported by me in https://github.com/bitcoin/bitcoin/pull/20228#discussion_r598081787

ACKs for top commit:
  practicalswift:
    Tested ACK 55554463c1
  vasild:
    ACK 55554463c1

Tree-SHA512: 4e5f51fe4f2bd7b2f37d0690e41203341ba45c0c9bc9247449cd26cfb5f77dc2ec61df3e4963276f68694e4b3ca3d0a76367a51c4d775501edeb3224d305a261
2021-03-23 09:43:15 +01:00
fanquake
1c3a8579c0
Merge #21421: build: don't try and use -fstack-clash-protection on Windows
7b3434f800 build: don't try and use -fstack-clash-protection on Windows (fanquake)

Pull request description:

  This has never worked with any of the mingw-w64 compilers we use, and the `-O0` is causing issues for builders applying spectre mitigations (see [IRC logs](http://www.erisian.com.au/bitcoin-core-dev/log-2021-03-12.html#l-15)).

  Recent discussion on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458 would also indicate that this should just not be used on Windows.

ACKs for top commit:
  laanwj:
    Concept and code review ACK (but untested) 7b3434f800
  hebasto:
    ACK 7b3434f800, I've verified that this change does not affect builds for `HOST=x86_64-w64-mingw32` by comparing sizes of the output `*.exe` files.

Tree-SHA512: 72b582321ddff8db3201460fa42a53304e70f141ae078d76a4d4eeb1ca27c8dd567ccb468cc8616179c8df784bd8ca038dcb9a277f9e29f9d98c3cc842916b18
2021-03-23 12:03:10 +08:00
fanquake
180dc3c886
build: miniupnpc 2.2.2
Creating the dll subdir is no-longer required.
We can also drop our wingen patch.
2021-03-23 08:39:16 +08:00
Wladimir J. van der Laan
c46f1ce751
Merge #21418: contrib: Make systemd invoke dependencies only when ready
663f6cd9dd contrib: Use -daemonwait in systemd init script (Wladimir J. van der Laan)

Pull request description:

  Make systemd invoke dependencies only when ready by using `-daemonwait` in the service file instead of `-daemon`.

  Closes #21322 by making bitcoind conform to behavior specified for `type=forking`.

  This may need some tuning of timeouts.

ACKs for top commit:
  darosior:
    ACK 663f6cd
  hebasto:
    re-ACK 663f6cd9dd

Tree-SHA512: 890005852b632a202caa578e6c796ebdc9da0b2379a9157a4f56f7db9d193c0ffbb78d120bbf112ab2f273855f2a08c3da000b1f7a9fb5222a3b94dcdb16b878
2021-03-22 15:15:14 +01:00
Wladimir J. van der Laan
663f6cd9dd contrib: Use -daemonwait in systemd init script
Closes #21322 by making bitcoind conform to behavior specified for
`type=forking`.
2021-03-22 13:42:13 +01:00
MarcoFalke
1e4a3c057a
Merge #21317: util: Make Assume() usable as unary expression
fa4cebadcf util: Make Assume() usable as unary expression (MarcoFalke)

Pull request description:

  Assume shouldn't behave different at the call site depending on build flags. Currently compilation fails if it is used as expression. Fix that by using the lambda approach from `Assert()` without the `assert()`.

ACKs for top commit:
  jnewbery:
    ACK fa4cebadcf
  practicalswift:
    cr ACK fa4cebadcf: patch looks correct and commit hash starts with `fa`

Tree-SHA512: 9ec9ac8d410cdaf5e4e28df571a89e3d23d38e05a7027bb726cae3da6e9314734277e5a218e9e090cc17e10db763da71052c229ad642077ca5824ee42022f3ed
2021-03-22 08:35:21 +01:00
MarcoFalke
786654aa5e
Merge #21498: refactor: return std::nullopt instead of {}
5294f0d5a9 refactor: return std::nullopt instead of {} (fanquake)

Pull request description:

  In #21415 [we decided](https://github.com/bitcoin/bitcoin/pull/21415#issuecomment-800236640) to return `std::optional` rather than `{}` for
  uninitialized values. This PR replaces the two remaining usages of `{}`
  with `std::nullopt`.

  As a side-effect, this also quells the spurious GCC 10.2.x warning that
  we've had reported quite a few times. i.e #21318, #21248, #20797.

  ```bash
  txmempool.cpp: In member function ‘CTxMemPool::setEntries CTxMemPool::GetIterSet(const std::set<uint256>&) const’:
  txmempool.cpp:898:13: warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    898 |     return {};
        |             ^
  ```

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

Tree-SHA512: 5b776be79ab26e5a3a5fc2b463b394ea5ce6797ed5558424873fa4ecee2898170eff76d6da9d69394d28f8f98974117fc63b922a3e19c52f5294c83073e79bb0
2021-03-22 06:42:04 +01:00
fanquake
80cb51cc6b
Merge #21491: test: remove duplicate assertions in util_tests
7e3444805e test: remove duplicate assertions in util_tests (Jon Atack)

Pull request description:

  as noticed by Kiminuo in https://github.com/bitcoin/bitcoin/pull/21488#discussion_r598247676

ACKs for top commit:
  practicalswift:
    cr ACK 7e3444805e: patch looks correct
  vasild:
    ACK 7e3444805e

Tree-SHA512: ad3d5983ad3a665155d766843dfda7178ced47e82154838331e428ed0828a467c1cf4bf99270aaf191e94156d485fafd0a7d5bc68248c4c1304a00ca5a2a9d2e
2021-03-22 11:43:35 +08:00
fanquake
5294f0d5a9
refactor: return std::nullopt instead of {}
In #21415 we decided to return `std::optional` rather than `{}` for
uninitialized values. This PR repalces the two remaining usages of `{}`
with `std::nullopt`.

As a side-effect, this also quells the spurious GCC 10.2.x warning that
we've had reported quite a few times. i.e #21318, #21248, #20797.

```bash
txmempool.cpp: In member function ‘CTxMemPool::setEntries CTxMemPool::GetIterSet(const std::set<uint256>&) const’:
txmempool.cpp:898:13: warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  898 |     return {};
      |             ^
```
2021-03-22 11:22:06 +08:00
Hennadii Stepanov
810b1310d6
build: Do not build unused CoreWLAN stuff in depends for macOS 2021-03-21 23:45:26 +02:00
Igor Cota
246774e264 depends: fix Qt precompiled headers bug
Fixed in 5.14, see QTBUG-85214
2021-03-21 22:33:35 +01:00
Igor Cota
8e7ad4146d depends: disable Qt Vulkan support on Android 2021-03-21 22:33:35 +01:00
Igor Cota
ba46adaa1a CI: add Android APK build to cirrus 2021-03-21 22:33:35 +01:00
Igor Cota
7563720e30 CI: add Android APK build script 2021-03-21 22:33:35 +01:00
Igor Cota
ebfb10cb75 Qt: add Android packaging support
Introduce an android directory under qt and allow one to package bitcoin-qt for Android by running make apk.
Add bitcoin-qt Android build instructions.
2021-03-21 22:33:27 +01:00
Jon Atack
7e3444805e
test: remove duplicate assertions in util_tests
Co-authored-by: Kiminuo <kiminuo@protonmail.com>
2021-03-21 11:14:35 +01:00
MarcoFalke
d2a78ee928
Merge #21488: test: add ParseUInt16() unit test and fuzz coverage
3d086f42ab test: add ParseUInt16() test coverage (Jon Atack)

Pull request description:

  `ParseUInt16()` was just added in #21328.

ACKs for top commit:
  practicalswift:
    cr ACK 3d086f42ab: patch looks correct & more coverage is better than less coverage

Tree-SHA512: bf7f96deb7c1531419565907f0ea8a8e32b368d4b823a3e80928b2c118edbf643ea06e357b4b5504a89f855caeed289daa9f823c740231ed6ad1b8ed00285ce8
2021-03-21 08:12:56 +01:00
MarcoFalke
9dbec05600
Merge #21349: build: Fix fuzz-cuckoocache cross-compiling with DEBUG=1
52a43b0c7d build: Fix fuzz-cuckoocache cross-compiling for Windows with DEBUG=1 (Hennadii Stepanov)

Pull request description:

  Fix #21348.

ACKs for top commit:
  practicalswift:
    Tested ACK 52a43b0c7d

Tree-SHA512: 6592f829edfb740a1e9d0691acf04b2372e91b0a53ca395b08350cb0b80031d3b55fa7331bdaddf857d450eb30b605af9fe8fe02559cda19374a48f9634fae70
2021-03-21 08:05:00 +01:00
MarcoFalke
4132193617
Merge #21040: wallet: Fix already-loading message grammar
ae9d26a8f0 wallet: Fix already-loading error message grammar (Fotis Koutoupas)

Pull request description:

ACKs for top commit:
  practicalswift:
    cr ACK ae9d26a8f0
  prayank23:
    ACK ae9d26a8f0

Tree-SHA512: 2f58d309dd33954f47e3ed339887b11bfdad4519f89ed3dd9bf3fb0db246d78b89653d553d02350ec84ce68bbb904db9fac00a2aad8d37f48df694d6782f35df
2021-03-21 07:51:11 +01:00
Anthony Towns
aa7f418fe3 fuzz: cleanups for versionbits fuzzer 2021-03-21 11:21:41 +10:00
MarcoFalke
63952f73b3
Merge #20921: validation: don't try to invalidate genesis block in CChainState::InvalidateBlock
787df19b09 validation: don't try to invalidate genesis block (Sebastian Falbesoner)

Pull request description:

  In the block invalidation method (`CChainState::InvalidateBlock`), the code for creating the candidate block map assumes that the passed block's previous block (`pindex->pprev`) is available and otherwise segfaults due to null-pointer deference in `CBlockIndexWorkComparator()` (see analysis by practicalswift in #20914), i.e. it doesn't work with the genesis block. Rather than analyzing all possible code paths and implications for this corner case, simply fail early if the genesis block is passed.

  Fixes #20914.

ACKs for top commit:
  sipa:
    ACK 787df19b09. Tested invalidation of generic on regtest.
  practicalswift:
    Tested ACK 787df19b09

Tree-SHA512: 978be7cf2bd1c1faebfe945d191ac77dea72791bea826459abd308f77c74c5991efee495a38817c306e488ecd5208b5c888df7d9d044132dd9a06bbbdb256b6c
2021-03-20 12:46:11 +01:00
MarcoFalke
55554463c1
fuzz: Use ConsumeWeakEnum in addrman for service flags 2021-03-20 12:03:12 +01:00
bruno
581791c620 test: add functional test for anchors.dat 2021-03-19 20:30:52 -03:00
Jon Atack
3d086f42ab
test: add ParseUInt16() test coverage 2021-03-19 23:50:36 +01:00
MarcoFalke
3530d5d2d8
Merge #18335: bitcoin-cli: print useful error if bitcoind rpc work queue exceeded
8dd5946c0b add functional test (Larry Ruane)
b5a80fa7e4 util: Handle HTTP_SERVICE_UNAVAILABLE in bitcoin-cli (Hennadii Stepanov)

Pull request description:

  If `bitcoind` is processing 16 RPC requests, attempting to submit another request using `bitcoin-cli` produces this less-than-helpful error message: `error: couldn't parse reply from server`. This PR changes the error to: `error: server response: Work queue depth exceeded`.

ACKs for top commit:
  fjahr:
    tACK 8dd5946c0b
  luke-jr:
    utACK 8dd5946c0b (no changes since previous utACK)
  hebasto:
    re-ACK 8dd5946c0b, only suggested changes since my [previous](https://github.com/bitcoin/bitcoin/pull/18335#pullrequestreview-460621350) review.
  darosior:
    ACK 8dd5946c0b

Tree-SHA512: 33e25f6ff05d9b56fae2bdb68b132557bb8e995f5438ac4fbbc53c304c5152a98aa43c43600c31d8a6a2830cbd48bf8ec7d89dce50190b29ec00a43830126913
2021-03-19 20:52:16 +01:00