Commit Graph

20014 Commits

Author SHA1 Message Date
W. J. van der Laan
aaf105c8b5 Merge bitcoin/bitcoin#21911: build: add configure~ to .gitignore
bc4538806e3c53e7821e01d5db896f65dd3358ad build: add *~ to .gitignore (Sjors Provoost)

Pull request description:

  The file `configure~` recently started appearing for me on macOS (11.3.1) whenever configure is (re)run.

ACKs for top commit:
  hebasto:
    ACK bc4538806e3c53e7821e01d5db896f65dd3358ad, tested on Linux Mint 20.1 with different build scenarios including cross-compiling for Windows and macOS.

Tree-SHA512: 830c7baf392ff6d66250a79c6ed0a98dac3daaace54a6d2e7940b9a72e3bac79ab44bbecd7642c931fde8a446654e2260d6afdecc679a1743fae6ec5eeda79f1
2021-07-15 16:01:43 -05:00
MarcoFalke
38b3d18083 Merge bitcoin/bitcoin#21895: refactor: Add TSA annotations to the WorkQueue class members
34b04eec4448bd37a8dbf560e4d99c7e7ca7e9c0 refactor: Add TSA annotations to the WorkQueue class members (Hennadii Stepanov)

Pull request description:

  Noted while reviewing #19033, and hoping this will not conflict with it :)

ACKs for top commit:
  promag:
    Code review ACK 34b04eec4448bd37a8dbf560e4d99c7e7ca7e9c0.

Tree-SHA512: 4c15729acd95223263c19bc0dd64b9e7960872b48edee6eee97a5d0c2b99b8838185ac3a2ccd5bee992cb3a12498633427fe9919be5a12da9949fcf69a6275a0
2021-07-15 16:01:43 -05:00
MarcoFalke
34c414e8db Merge bitcoin/bitcoin#21581: streams: Accept URef obj for VectorReader unserialize
fa2204f6adef493079d1ca5148b0fdc2b55816e6 streams: Accept URef obj for VectorReader unserialize (MarcoFalke)

Pull request description:

  Missed in commit 172f5fa738. An URef may collapse into an LRef or RRef depending on context. There is no reason to forbid RRef in `VectorReader::operator>>`, so add it for consistency.

ACKs for top commit:
  ryanofsky:
    Code review ACK fa2204f6adef493079d1ca5148b0fdc2b55816e6, just expanded test since last review

Tree-SHA512: 09ff4e8a918e15b08cebd8c125d37e78bfb3a635c38546fc8454a97a882b2c81c55ef552243617e78744799d31127e6fbf78c4e319c030480b370aab6f38b645
2021-07-15 16:01:43 -05:00
fanquake
5d11b57e5c Merge bitcoin/bitcoin#21869: depends: Add missing -D_LIBCPP_DEBUG=1 to debug flags
fa9249aaccc3ef7a0a91a822e1cb666c4c9716ec depends: Add missing -D_LIBCPP_DEBUG=1 to debug flags (MarcoFalke)

Pull request description:

  Commands that can be used for testing:

  ```
  $ cat 1.cpp
  #include <vector>

  int main() {
    std::vector<int> foo;
    foo.begin() + 7;
  }
  ```

  ```
  clang++ -stdlib=libc++ -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_LIBCPP_DEBUG=1 -Wall 1.cpp -o exe && ./exe
  g++                    -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_LIBCPP_DEBUG=1 -Wall 1.cpp -o exe && ./exe

ACKs for top commit:
  practicalswift:
    cr ACK fa9249aaccc3ef7a0a91a822e1cb666c4c9716ec: patch looks correct
  fanquake:
    ACK fa9249aaccc3ef7a0a91a822e1cb666c4c9716ec - was going to suggest adding this to the macOS CPP flags as well, however it seems doing that is less straight forward. Could be looked at by someone in a followup.

Tree-SHA512: 2ffbaaf0ccb36bcc9fa1a15426566406c6115c8878ff211a4794d982c5d198672d444a20f6c7ae9f341193f6d8118c7cc50896daf98af9553834379e47ddb39e
2021-07-15 16:01:43 -05:00
MarcoFalke
a43fdd469a Merge bitcoin/bitcoin#21564: net: Avoid calling getnameinfo when formatting IPv4 addresses in CNetAddr::ToStringIP
58580a827d10c0675c3483e2aeca1d3ab8050ae0 net: Avoid calling getnameinfo when formatting IPv4 addresses in CNetAddr::ToStringIP (practicalswift)
58580573843858068db69a378b6e9363889b1f6d net: Add IPv4ToString (we already have IPv6ToString) (practicalswift)

Pull request description:

  Avoid calling `getnameinfo` when formatting IPv4 addresses in `CNetAddr::ToStringIP`.

ACKs for top commit:
  naumenkogs:
    ACK 58580a827d10c0675c3483e2aeca1d3ab8050ae0
  0xB10C:
    ACK 58580a827d10c0675c3483e2aeca1d3ab8050ae0
  vasild:
    ACK 58580a827d10c0675c3483e2aeca1d3ab8050ae0

Tree-SHA512: 25e3c416acb74908d001baf1cf64c04cbc0d94ce8e7ce5a601f1343062d5d748cb406a3404e6f2b6e7e979c6300b38439e1bfd70ea90ec8c0ec2d7568f09fbcd
2021-07-15 16:01:28 -05:00
MarcoFalke
3f3bdafd4e Merge #19095: [tools] Update clang-format config for multi-line function declarations and calls
cc29d1e2c46e01c544ef44c79d72b7bcc5d39ba7 [tools] Update clang-format config (John Newbery)

Pull request description:

  In some cases, running clang-format has made code _less_ readable by joining declarations and calls for functions with many arguments into very long lines. For example:

  ```
  -    size_t getQueueInfo(std::chrono::system_clock::time_point &first,
  -                        std::chrono::system_clock::time_point &last) const;
  +    size_t getQueueInfo(std::chrono::system_clock::time_point& first, std::chrono::system_clock::time_point& last) const;
  ```

  (https://github.com/bitcoin/bitcoin/pull/19090#discussion_r431961148)

  This change to clang-format would allow arguments/parameters for func declarations/calls to be split over multiple lines, aligned with the opening parens. It does not force args/params to be on new lines (that setting is `BinPackParameters : true`).

ACKs for top commit:
  MarcoFalke:
    ACK cc29d1e2c46e01c544ef44c79d72b7bcc5d39ba7 fine with me
  practicalswift:
    ACK cc29d1e2c46e01c544ef44c79d72b7bcc5d39ba7

Tree-SHA512: a62474925e71aaff41bdce7960fd5ffd64317da810f694d8084080b054708cf71c2ab2ce3111db5a9260d1c1f9e02d59a2ecb5543b1b6172ce085cb42432160a
2021-07-15 15:52:05 -05:00
fanquake
1a20c25a0d Merge #19301: build: don't warn when doxygen isn't found
fa84edb93c85f7709fc53abf9c6daae5d1bb3b28 build: don't warn when doxygen isn't found (fanquake)

Pull request description:

  Doxygen isn't so important that we need to warn when it is missing. I'd
  assume it might even be missing more often than not for most builds.

ACKs for top commit:
  MarcoFalke:
    Fine with me ACK fa84edb93c85f7709fc53abf9c6daae5d1bb3b28
  hebasto:
    ACK fa84edb93c85f7709fc53abf9c6daae5d1bb3b28, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 793ebf01a8a5d48b78a70fdef0022633fca59b30074c960ebb21589e3bd98992b8304621a2d999195d12172ed30fe9eefeeb2a952d58853cf58e8d9902b0090c
2021-07-15 15:52:05 -05:00
Kittywhiskers Van Gogh
da33c9619c
partial merge #17398: Update leveldb to 1.22+ (#4230)
* Update to leveldb upstream using subtree merge

* Import crc32c using subtree merge as as 'src/crc32c'

* build: Update build system for new leveldb

Upstream leveldb switched build systems, which means we need to define
a few different values.

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

* doc: Add crc32c subtree to developer notes

* test: Add crc32c to subtree check linter

* test: Add crc32c exception to various linters and generation scripts

* build: Add LCOV exception for crc32c

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

* build: CRC32C build system integration

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-07-15 15:42:55 -05:00
pasta
12972fe88e refactor: utilize GetLLMQParams, make it const, consistent naming
Removes all (besides one) usages of "Params().GetConsensus().llmqs.at" and instead uses the wrapper in quorum_utils.cpp

Rename all params to llmq_params for consistency and not conflict with non-llmq params

make some llmq_params const where possible

remove unneeded llmq_params variables where it's only used once

Signed-off-by: pasta <pasta@dashboost.org>
2021-07-15 15:28:58 -05:00
MarcoFalke
48da7c553a Merge #16564: test: Always define the raii_event_tests test suite
9a19c9ada53e84d1ee8521b48f656faad48b737a Always define the raii_event_tests test suite (Craig Andrews)

Pull request description:

  The test suite must always be defined (even when EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED is not defined) so that the test harness doesn't fail due to not being able to find the raii_event_tests test.

  This improves upon 95f97f4 actually fixing https://github.com/bitcoin/bitcoin/issues/9493

ACKs for top commit:
  MarcoFalke:
    ACK 9a19c9ada53e84d1ee8521b48f656faad48b737a 🎹

Tree-SHA512: 3c42f17a9b5d56c8841f3aa9ac19da91c10aff210026266f31f7eb98a62528740d7c518c121452b68e8f801d6c80ecfb627d137ec6ed533289fa3beb08b4f176
2021-07-15 13:26:07 -05:00
Jonas Schnelli
f8d785665e Merge #14988: wallet: Fix for confirmed column in csv export for payment to self transactions
9760293ce632e09f0175368ebf0c8502ac9b10d4 wallet: Fix for exported confirmation field in payment to self transactions (Ben Carman)

Pull request description:

  Closes #3455

ACKs for top commit:
  jonasschnelli:
    Tested ACK 9760293ce632e09f0175368ebf0c8502ac9b10d4

Tree-SHA512: 8207768771ad787f716b966c4aa7aeef2da8a602e32e3510e41c7b49ec5ec679a3835d248be5016d4b37764f9914846f7c41c11cf48cddb617cb7ef831318fd7
2021-07-15 13:26:07 -05:00
fanquake
68e1c05e8b Merge #19097: qt: Add missing QPainterPath include
79b0a69e09c1a912122e6431ea3c530cc292c690 Add missing QPainterPath include (Andrew Chow)

Pull request description:

  This is needed to compile with Qt 5.15.

ACKs for top commit:
  laanwj:
    Code review ACK 79b0a69e09c1a912122e6431ea3c530cc292c690
  MarcoFalke:
    Code review ACK 79b0a69
  promag:
    Code review ACK 79b0a69e09c1a912122e6431ea3c530cc292c690.

Tree-SHA512: 8dbc3fa4572ad9cacd72e9664926729947681b8ed4f4a0607e27e6389eb95c8b49e6883ae8dbdea7edbbfea267b4520c4844897a7b67f55f4b988b9feb689e60
2021-07-15 13:26:07 -05:00
Wladimir J. van der Laan
afd217904a Merge #18700: Fix locking on WSL using flock instead of fcntl
e8fa0a3d2025509fcddc59fc618e91371542cf87 Fix WSL file locking by using flock instead of fcntl (Samuel Dobson)

Pull request description:

  Fixes #18622

  A bug in WSL means that fcntl does not exclusively lock files, allowing multiple instances of bitcoin to use the same datadir. If we instead use flock, it works correctly. Passes Travis, but testing on some OS variety would be sensible.

  From what I can tell, flock and fcntl don't work with each other on linux, so it would still be possible to run a node with this code change and a node before it with the same datadir (this isn't true for Mac/FreeBSD). flock also doesn't support NFS on MacOS and linux<2.6.12 while fcntl did. See here for example: https://gavv.github.io/articles/file-locks/

  If changing to flock for all systems is inadvisable, it would also be possible to just detect WSL and use flock when on that platform to avoid the bug.

ACKs for top commit:
  laanwj:
    Code review ACK e8fa0a3d2025509fcddc59fc618e91371542cf87

Tree-SHA512: ca1009e171970101f1dc2332c5e998717aee00eebc80bb586b826927a74bd0d4c94712e46d1396821bc30533d76deac391b6e1c406c406865661f57fa062c702
2021-07-15 13:26:07 -05:00
fanquake
7ac32ac79f Merge #19073: Remove outdated comment about DER encoding
4c825792dd9f4eaf4936c3e376ac7a5c177528e2 Remove outdated comment about DER encoding (Elichai Turkel)

Pull request description:

  This comment got me confused about the status of BIP66 (Thanks jnewbery for explaining)
  The comment was added in: https://github.com/bitcoin/bitcoin/pull/3843
  But in https://github.com/bitcoin/bitcoin/pull/5713 strict DER encoding was enforced in consensus,
  and is now it's buried and enforced by the height of the block here: 4af01b37d4/src/validation.cpp (L1889)

  P.S. This is also quite confusing: 4af01b37d4/src/validation.cpp (L1560-L1563) But seems to be intentional: 4af01b37d4/src/validation.cpp (L1510-L1511)

ACKs for top commit:
  laanwj:
    ACK 4c825792dd9f4eaf4936c3e376ac7a5c177528e2

Tree-SHA512: 7afbbae84ed4ecfaa0a273ae024b14f2b7ffe65307f078086fe0b5b645c57722bc2952fb15d167d9e4fa5b052d1d0ac6e5e33f57e8fc881c0ea611d352bccc1e
2021-07-15 13:26:07 -05:00
fanquake
b742a7f8d8 Merge #19059: gui: update Qt base translations for macOS release
69bfcac27a83440092bc6e61904ded910ed4baf4 gui: update Qt base translations for macOS release (fanquake)

Pull request description:

  These haven't been updated since their addition, so this updates the list that
  controls which qt base translations are bundled with the macOS binary, to all the
  languages that are available with qt 5.9.8.

  This could probably be improved in some way, however qt updates are infrequent,
  and I didn't want to spend any more time looking at this. Also given that no-one
  seems to have noticed and/or reported this it wouldn't seem high-priority.

  Could be backported to 0.20.1.

  Master:
  ![master](https://user-images.githubusercontent.com/863730/82729428-11bce200-9d2a-11ea-8569-ee65d46c7403.png)

  This PR:
  ![fixed](https://user-images.githubusercontent.com/863730/82729427-0f5a8800-9d2a-11ea-86dd-1e6a3e211efa.png)

ACKs for top commit:
  hebasto:
    ACK 69bfcac27a83440092bc6e61904ded910ed4baf4, tested on macOS 10.15.

Tree-SHA512: df142fb16097deb514e72e005b73aafc4eb4ff0c17e423ba5040a3ec6874020a733e1c5259a88923580e71ef73c16222aed28f482b8c270a544a85b745a7b327
2021-07-15 13:26:07 -05:00
fanquake
1ac86caa01 Merge #18999: log: Remove "No rpcpassword set" from logs
fa243be1dc49385fff847f8a784c7a9c9f07c939 log: Remove "No rpcpassword set" from logs (MarcoFalke)

Pull request description:

  rpcpassword is deprecated and not recommended anymore. So remove it from the logs, which indicate that an rpcpassword should be set and cause confusion. See #18998.

ACKs for top commit:
  ryanofsky:
    Code review ACK fa243be1dc49385fff847f8a784c7a9c9f07c939. New log message makes more sense
  elichai:
    Re Code Review ACK (Checked the diff) fa243be1dc49385fff847f8a784c7a9c9f07c939

Tree-SHA512: de3e0800a204b15a59a59a7e6f345013ee9d38e8c5d0c9a94d6142780faa9cce672ed358c7571f53c1eb843bf5afb0b7bcbfd289d3b9e2e0bf8ff2fd361e98a9
2021-07-15 13:26:07 -05:00
MarcoFalke
08492610e2 Merge #18634: ci: Add fuzzbuzz integration configuration file
8d306862ef077f2a71931372dd6a2efa05188c84 ci: Add fuzzbuzz integration (practicalswift)

Pull request description:

  Add fuzzbuzz integration.

  Just like #15338 enabled optional FreeBSD building via Cirrus CI (`.cirrus.yml`) this PR adds optional fuzzing via fuzzbuzz (`.fuzzbuzz.yml`).

  Having this merged makes is easier for people to fuzz Bitcoin Core (via their forked repos) using their fuzzbuzz account and then hopefully submit coverage increasing corpus additions upstreams to to https://github.com/bitcoin-core/qa-assets.

  Historically it has been mostly been me and MarcoFalke who submit test cases to `qa-assets`, but with this change hopefully more people will join the hunt for coverage increasing fuzzing inputs :)

Top commit has no ACKs.

Tree-SHA512: c7d8e354996c673da36cc9add260383c82a5325bfaa7ce6141ad6cd6b7d6adf3a6c900ea2db17fb70147b3625fa7f6a1ff8ba813aeaa299f316d8f6cabb3a65c
2021-07-15 13:26:07 -05:00
fanquake
ceeea4c0fa Merge #18738: build: Suppress -Wdeprecated-copy warnings
0c63f808542ba02fc41aa90b1d96e9123f16d8ad build: Suppress -Wdeprecated-copy warnings (Hennadii Stepanov)

Pull request description:

  Tomorrow, on Apr 23 the Ubuntu 20.04 release is expected. It packaged with Qt 5.12 LTS that has a nasty peculiarity to cause modern compilers, including Clang 10.0 and GCC 9.3, to emit spammy `-Wdeprecated-copy` warnings (#15822, #18419).

  This PR suppress such warnings _temporarily_, until the [upstream is fixed](https://codereview.qt-project.org/c/qt/qtbase/+/272258).

  Here are some affected systems (with system packages):
  - Ubuntu 20.04 LTS + Qt 5.12.8 LTS + { Clang 10.0 | GCC 9.3 }
  - Fedora 32 + Qt 5.13.2 + Clang 10.0

  Reference: [QTBUG-75210](https://bugreports.qt.io/browse/QTBUG-75210)

  Also see **fanquake**'s [comment](https://github.com/bitcoin/bitcoin/pull/18738#issuecomment-622956100).

ACKs for top commit:
  MarcoFalke:
    ACK 0c63f808542ba02fc41aa90b1d96e9123f16d8ad seems fine to disable this warning for the 0.21.0 release temporarily and then enable it for 0.22.0, when boost is removed.
  fanquake:
    ACK 0c63f808542ba02fc41aa90b1d96e9123f16d8ad - I think it's ok to suppress these for now, given that `-Wdeprecated-copy` is enabled (via `-Wextra`) in GCC 9 and Clang 10. The Qt output is pretty noisy, and there's a few warnings from Boost as well.

Tree-SHA512: 7064a3272bc9eae00b73a16c421ac58be148f374cbef87320e8f092f52761f6e98166eff60346b70867f8a69a9698a79455dc16b42d92f8fbe7c56519571ac08
2021-07-15 13:26:07 -05:00
Jonas Schnelli
8af8bbc20e Merge #18578: gui: Fix leak in CoinControlDialog::updateView
e8123eae40eb264bbb71007d0eb074901f0e2fe5 gui: Fix itemWalletAddress leak when not tree mode (João Barbosa)

Pull request description:

  Taken from #17457, the first commit is a similar to 88a94f7bb8ba2b0257315d70717f9af928ca6561 but for test binary, and the second commit fixes a leak where `CCoinControlWidgetItem` are unnecessarily created and leaked.

ACKs for top commit:
  jonasschnelli:
    utACK e8123eae40eb264bbb71007d0eb074901f0e2fe5
  hebasto:
    ACK e8123eae40eb264bbb71007d0eb074901f0e2fe5, tested on Linux Mint 19.3.

Tree-SHA512: 8b43cb29de103842ce5f048de51222919540d3212d2873c16731145e856178644041924ad0e9a58c2ff08f209a9b4ac26dc9965289eb719da233c0984f93631e
2021-07-15 13:26:07 -05:00
MarcoFalke
8c1a763ccc Merge #18866: test: Fix verack race to avoid intermittent test failures
fae153b40968bfd974a4709bcd841a59447abf18 test: Fix verack race to avoid intermittent test failures (MarcoFalke)

Pull request description:

  Fixes #18832

ACKs for top commit:
  laanwj:
    ACK fae153b40968bfd974a4709bcd841a59447abf18

Tree-SHA512: 071de8c8e2b2787c9433c7460e18b9a54beaf471a52ce848c5ac7263fc2a40f5b976d4f558ecc494fd0fa07284b7c98d29267cade58f80ab74fe9a7d18d94298
2021-07-15 13:26:07 -05:00
fanquake
ab19552f31 Merge #18535: build: remove -Qunused-arguments workaround for clang + ccache
a029805f57fa9a4ab9867c0d1e865675d57537c7 build: remove -Qunused-arguments workaround for clang + ccache (fanquake)

Pull request description:

  This was added in 386efb7695 to address spammy Clang warnings when building with ccache.

  The issue was addressed in [ccache 3.2](https://bugzilla.samba.org/show_bug.cgi?id=8118), and from a look at most major distros, it's only Debian Jessie that has a version of ccache older than that ([3.1](https://packages.debian.org/jessie/ccache)).

  Therefore I think it's acceptable to drop this workaround, and re-enable warnings for unused driver arguments (when compiling using Clang and ccache).

ACKs for top commit:
  hebasto:
    ACK a029805f57fa9a4ab9867c0d1e865675d57537c7.
  vasild:
    utACK a029805f57fa9a4ab9867c0d1e865675d57537c7

Tree-SHA512: f887b9bd12f9c1c8d209943b86e8dafe33cfd1572912f2cafabe08ffe403973e48f0f7289280a8c6db9263c57aad43fbd4bb72f42db762eb090f3b1ef0538f43
2021-07-15 13:26:07 -05:00
Wladimir J. van der Laan
b566c464ed Merge #18443: lockedpool: avoid sensitive data in core files (FreeBSD)
f85203097f78d9daa1d35c4097a80beab31da2a4 lockedpool: avoid sensitive data in core files (FreeBSD) (Vasil Dimov)

Pull request description:

  This is a followup to
  23991ee53 / https://github.com/bitcoin/bitcoin/pull/15600
  to also use madvise(2) on FreeBSD to avoid sensitive data allocated
  with secure_allocator ending up in core files in addition to preventing
  it from going to the swap.

ACKs for top commit:
  sipa:
    ACK f85203097f78d9daa1d35c4097a80beab31da2a4 if someone verifies this works as intended on *BSD.
  laanwj:
    ACK f85203097f78d9daa1d35c4097a80beab31da2a4
  practicalswift:
    Code-review ACK f85203097f78d9daa1d35c4097a80beab31da2a4 assuming a reviewer with FreeBSD access verifies that the PR goal is achieved :)

Tree-SHA512: 2e6d4ab6a9fbe18732c8ba530eacc17f58128c97140758b80c905b5b838922a2bcaa5f9abc45ab69d5a1a2baa0cba322f006048b60a877228e089c7e64dadd2a
2021-07-15 13:26:07 -05:00
UdjinM6
07e7be34d2
Merge pull request #4250 from PastaPastaPasta/backport-triv-pr11
backport: 'trivial' pr11
2021-07-15 20:34:04 +03:00
Wladimir J. van der Laan
1555ee3a6c Merge #17746: refactor: rpc: Remove vector copy from listtransactions
25bc17fceb08ee9625c5e09e2579117ec6f7a1c5 refactor: rpc: Remove vector copy from listtransactions (João Barbosa)

Pull request description:

  Current approach
   - copy accumulated `ret` vector to `arrTmp`
   - drop unnecessary elements from `arrTmp`
   - reverse `arrTmp`
   - clear `ret`
   - copy `arrTmp` to the `ret`

  New approach
   - create a vector from the accumulated `ret` with just the necessary elements already reversed
   - copy it to the result

  This PR doesn't change behavior.

ACKs for top commit:
  ryanofsky:
    Code review ACK 25bc17fceb08ee9625c5e09e2579117ec6f7a1c5. Just comment and commit message tweaks since last review

Tree-SHA512: 87906561e3accdbdb0f4a8194cbcd76ea53ae53d0ce135b90bc54a5f77e300b14ef08505e7daf1fe52426f135442a743da5a027416a769bd454922357cebe7c0
2021-07-15 11:07:36 -05:00
Wladimir J. van der Laan
2a3fa63dc1 Merge #18101: qt: Fix deprecated QCharRef usage
ac57859e53167f4ff3da467b616b0902c93701a9 qt: Fix deprecated QCharRef usage (Hennadii Stepanov)

Pull request description:

  From Qt docs:
  - [`QKeyEvent::text()`](https://doc.qt.io/qt-5/qkeyevent.html#text):
  > Return values when modifier keys such as Shift, Control, Alt, and Meta are pressed differ among platforms and could return an empty string.

  - [`QString::operator[]()`](https://doc.qt.io/qt-5/qstring.html#operator-5b-5d):

  > **Note:** Before Qt 5.14 it was possible to use this operator to access a character at an out-of-bounds position in the string, and then assign to such a position, causing the string to be automatically resized. Furthermore, assigning a value to the returned `QCharRef` would cause a detach of the string, even if the string has been copied in the meanwhile (and the `QCharRef` kept alive while the copy was taken). These behaviors are deprecated, and will be changed in a future version of Qt.

  Since Qt 5.14 this causes a `QCharRef` warning if any modifier key is pressed while the splashscreen is still displayed.

  Fix #18080.

  Note: Ctrl+Q will also close the spashscreen now.

ACKs for top commit:
  jonasschnelli:
    utACK ac57859e53167f4ff3da467b616b0902c93701a9

Tree-SHA512: a7e5559410bd05c406007ab0243f458b82d434b0543276ed331254c8d7a6b1aaa54d0b406f799b830859294975004380160f8af04ba403d3bf185d51e6784f54
2021-07-15 11:07:36 -05:00
Wladimir J. van der Laan
9cdcdf2c5d Merge #18091: Qt: pass clientmodel changes from walletframe to walletviews
2af3e16ca917acd85c2d4f709f6d486519d6af0d Qt: pass clientmodel changes from walletframe to walletviews (Jonas Schnelli)

Pull request description:

  Fixes #18090

  We currently don't pass `clientmodel` changes from the `walletframe` to the `walletviews` leading to possible invalid access during shutdown because all walletviews miss the nullifying of the clientmodel.

  TODO: needs investigation if this is should be backported.

ACKs for top commit:
  laanwj:
    Good catch, code review ACK 2af3e16ca917acd85c2d4f709f6d486519d6af0d

Tree-SHA512: f8c0a114f01deac07fb311112d144f3bfc1c1882dd19e8742b372dd597d7a5d59cd0af99fc50494de2334cad98d6701675317474e40fe8820d04c058aeca1b75
2021-07-15 11:07:36 -05:00
fanquake
9a4636d57d Merge #18010: test: rename test suite name "tx_validationcache_tests" to match filename
b3c4d9bac6910f6c28f6008c5ca7064a315fd2a5 test: rename test suite name "tx_validationcache_tests" to match filename (Sebastian Falbesoner)

Pull request description:

  Quoting `src/test/README.md`, '`Adding test cases`':

  >     "The file naming convention is `<source_filename>_tests.cpp`
  >      and such files should wrap their tests in a test suite
  >      called `<source_filename>_tests`."

  Currently the unit test source file `txvalidationcache_tests.cpp` contains a unit test suite with the name `tx_validationcache_tests`, which is fixed by this PR. The following shell script shows that this is the only mismatch and for all other unit test source files the test suite names are correct:

  ```
   #!/bin/bash
   shopt -s globstar
   for test_full_filename in **/*_tests.cpp; do
       test_name_file=`basename $test_full_filename .cpp`
       test_name_suite=`sed -n "s/^.*TEST_SUITE(\(.*_tests\).*$/\1/p" $test_full_filename`
       if [ $test_name_file != $test_name_suite ]; then
           echo "TestFilename: $test_name_file != TestSuitname: $test_name_suite"
       fi
   done
  ```

ACKs for top commit:
  practicalswift:
    ACK b3c4d9bac6910f6c28f6008c5ca7064a315fd2a5 -- expected naming is better than unexpected naming :)
  kristapsk:
    ACK b3c4d9bac6910f6c28f6008c5ca7064a315fd2a5

Tree-SHA512: 29d409b1eb22057ee2cc407508e2580d2bc03f412401df11b8ecf77be5ada6bda8f7d2cb5338c5e079490fa12242c1fd6230a09e47252c1b0d9fe535a828ca4c
2021-07-15 11:07:36 -05:00
Jonas Schnelli
9359a604f9 Merge #17998: gui: Shortcut to close ModalOverlay
1a638e11055743ac089973b92f46c376466fe621 gui: Shortcut to close ModalOverlay (Emil Engler)

Pull request description:

  This adds the shortcut `Esc` to hide the ModalOverlay.
  The motivation is that it is annoying to always move the cursor to "Hide" when quickly testing something in the GUI with an outdated chain.

ACKs for top commit:
  kristapsk:
    ACK 1a638e11055743ac089973b92f46c376466fe621. Agree with @promag, Esc feels more natural than Enter here.
  jonasschnelli:
    ACK 1a638e11055743ac089973b92f46c376466fe621

Tree-SHA512: ea764349ec145ce9a34cbc66c3ac0eace9233a3fb3e9c22694a77882478afa22d4e686ce2c1d7b3938f6769f96ba995577b0216ba9d98954dcf3e55d2187f2e0
2021-07-15 11:07:36 -05:00
fanquake
25f3f66655 Merge #17980: test: add missing #include to fix compiler errors
a5a2654bbc43b5c208418872e5d4c0acbadda5de test: add missing #include to fix compiler errors (Karl-Johan Alm)

Pull request description:

  I believe this fixes AppVeyor errors in master. Will close if that is not the case.

  Closes #17976

ACKs for top commit:
  fanquake:
    ACK a5a2654bbc43b5c208418872e5d4c0acbadda5de - glad the fix turned out to be this simple.

Tree-SHA512: 8fed8c2050d0f435e7ed6db1c2927d5daccc3540c6cf9e57e644d0931a740359550a5270201c893f40200960101f11cd039d807d4ed0190f1e0c674f86fd7290
2021-07-15 11:07:36 -05:00
fanquake
ac4670e62d Merge #17906: gui: Set CConnman byte counters earlier to avoid uninitialized reads
8313fa8e8112e429e104b7e7fd48e5e6e359b82e gui: Set CConnman byte counters earlier to avoid uninitialized reads (Russell Yanofsky)

Pull request description:

  Initialize CConnman byte counters during construction, so GetTotalBytesRecv() and GetTotalBytesSent() methods don't return garbage before Start() is called.

  Change shouldn't have any effect outside of the GUI. It just fixes a race condition during a qt test that was observed on travis: https://travis-ci.org/bitcoin/bitcoin/jobs/634989685

ACKs for top commit:
  MarcoFalke:
    ACK 8313fa8e8112e429e104b7e7fd48e5e6e359b82e
  promag:
    ACK 8313fa8e8112e429e104b7e7fd48e5e6e359b82e.

Tree-SHA512: 97c246da4e28e6e0b48f685b840f96746ad75c4b157a692201c6c4702db328a88ead8507d8e1b4e608aa1882513174ec60cf3977c31b7a9d76678cc9f49b45f8
2021-07-15 11:07:36 -05:00
fanquake
037fa2dd14 Merge #17893: qa: Fix double-negative arg test
8b2f471a1bff753cc4df29805ef38c3623f64f6e qa: Fix double-negative arg test (Hennadii Stepanov)

Pull request description:

  Commit 67518f7cc61bf59ddfa0fd7c8dbbdec3653b9556 tests do not catch that a pointer is returned instead of a value.

  This PR makes test to not accept trailing characters after 0.

  From [IRC](http://www.erisian.com.au/bitcoin-core-dev/log-2020-01-07.html#l-358):
  >  \<hebasto\> ryanofsky: hmm, why test/functional/feature_config_args.py passed on 67518f7cc61bf59ddfa0fd7c8dbbdec3653b9556 ?
  >  \<hebasto\> I see now: test is broken.
  >  \<ryanofsky\> test should be unaffected by that change, do you see a break somewhere?
  >  \<hebasto\> yes: "-connect=0x7fff50369968" != "-connect=0"
  > ...
  >  \<ryanofsky\> Oh I see how that would happen, it should not be a problem in the current PR.
  >  \<hebasto\> going to submit a pr to fix test
  >  \<ryanofsky\> in the commit you mentioned, value is a pointer to a string, and it was printing the pointer address instead of the string on: LogPrintf("Warning: parsed potentially confusing double-negative -%s=%s\n", key, value);
  >  \<hebasto\> correct
  >  \<ryanofsky\> oh I see, test could be fixed to more robust and not accept trailing characters after 0

ACKs for top commit:
  ryanofsky:
    Code review ACK 8b2f471a1bff753cc4df29805ef38c3623f64f6e. I don't know how you found this but it's a nice catch! This change should make the test more reliable.

Tree-SHA512: 454b3d4415771d353a2da766f6ae6e0bfae7bdf485aaa7bfdd323595282356eeaf3f40e556b39f753bc35f578cbe9684368887eef2d63c5d7f0d7d9fa971697a
2021-07-15 11:07:36 -05:00
fanquake
bad56d0ee8 Merge #17869: refactor: Remove unused defines in qt/bitcoinunits.h
7754d7ab1e4f1918fcc31396cd3e7507f936477f refactor: Remove unused defines in bitcoinunits.h (Hennadii Stepanov)

Pull request description:

  In `bitcoinunits.h` some `#define`s introduced in #4167 are unused now.

ACKs for top commit:
  emilengler:
    ACK 7754d7ab1e4f1918fcc31396cd3e7507f936477f
  fanquake:
    ACK 7754d7ab1e4f1918fcc31396cd3e7507f936477f
  promag:
    ACK 7754d7ab1e4f1918fcc31396cd3e7507f936477f.

Tree-SHA512: 688836a434d87530f99c309d8af60f63cdfdcfe583c9297636fbbed0f16a3dc0920d4249457303c00a83dc82d28edd8a99aab0b191c7ffbbd38c5d9fc8ee0df1
2021-07-15 11:07:35 -05:00
Wladimir J. van der Laan
56cd5d3c97 Merge #17758: Fix CNetAddr::IsRFC2544 comment + tests
529d332fbfe633d60845a97e1a06f552bd63d0d4 test: add IsRFC2544 tests (Mark Tyneway)
419ef3b7cc04e3ab26252d7024da847dfd5ab1a3 CNetAddr: fix IsRFC2544 comment (Mark Tyneway)

Pull request description:

  The comment describing the functionality of `CNetAddr::IsRFC2544` is incorrect.

  46d6930f8c/src/netaddress.h (L57)

  It should actually read `198.18.0.0/15` based on [RFC 3330](https://tools.ietf.org/html/rfc3330):

  ```
     198.18.0.0/15 - This block has been allocated for use in benchmark
     tests of network interconnect devices.  Its use is documented in
     [RFC2544].
  ```

  See [RFC 2544](https://tools.ietf.org/html/rfc2544) here.

  See the implementation here:

  47d981e827/src/netaddress.cpp (L142-L145)

  This PR also adds tests for the minimum and maximum values that are valid RFC 2544 addresses.

ACKs for top commit:
  practicalswift:
    ACK 529d332fbfe633d60845a97e1a06f552bd63d0d4
  laanwj:
    ACK 529d332fbfe633d60845a97e1a06f552bd63d0d4
  promag:
    ACK 529d332fbfe633d60845a97e1a06f552bd63d0d4, nit could squash.
  jonatack:
    ACK 529d332fbfe633d60845a97e1a06f552bd63d0d4

Tree-SHA512: 954a9582856d77564e0ea5fd2e3d287d0cfc4ecfe0588115692d01005e8ca7ad8ab20ff390ded867dc91af2bfb758d4e73a336e6c0b7798846c30a6d69b8ae3d
2021-07-15 11:07:35 -05:00
Wladimir J. van der Laan
fc6f390b5f Merge #17654: Unbreak build with Boost 1.72.0
a64e97dd476bda7c7981979d045b0d06d6f7ce47 wallet: unbreak with boost 1.72 (Jan Beich)

Pull request description:

  Regressed by https://github.com/boostorg/filesystem/commit/9a14c37d6f95. See [error log](http://package22.nyi.freebsd.org/data/113amd64-default-PR241449/2019-11-27_11h48m22s/logs/bitcoin-0.19.0.1.log).
  35eda631ed/src/fs.h (L14)

ACKs for top commit:
  MarcoFalke:
    ACK a64e97dd476bda7c7981979d045b0d06d6f7ce47

Tree-SHA512: 0aad2b8ec211bb81021a2f8cd2059364f949be716ebaf154dd97d5c2f7119f42553892e90e6c375018ff2155b996690c7520374762259778de88014cb531ad3b
2021-07-15 11:07:35 -05:00
MarcoFalke
65bac012ff Merge #17275: pubkey: Assert CPubKey's ECCVerifyHandle precondition
d8daa8f3711909223b117b8faa82daca87fc942d pubkey: Assert CPubKey's ECCVerifyHandle precondition (practicalswift)

Pull request description:

  Assert `CPubKey`'s `ECCVerifyHandle` precondition.

  This makes it more clear for fuzzing harness writers and others that `ECCVerifyHandle` is expected to be held when interacting with `CPubKey`.

  Related PR #17274.

ACKs for top commit:
  sipa:
    ACK d8daa8f3711909223b117b8faa82daca87fc942d

Tree-SHA512: 9e74086599799dc9b5c3fb8357445b662e5bf896d826af63d6d6b6ddb616612966f3bb5de3bd3ae0e692c47de85672f64b8ab6d3a1c45899dc25ba46990b5ec7
2021-07-15 11:07:35 -05:00
MarcoFalke
8adf798623 Merge #17555: test: add unit test for non-standard txs with wrong nVersion
76303f65f92a0fbe9a90c0e807554a6daa860636 test: add unit test for non-standard txs with wrong nVersion (Dominik Spicher)

Pull request description:

  Takes care of one of the missing cases of #17394: nVersion must be within the allowed range.

ACKs for top commit:
  instagibbs:
    ACK 76303f65f9

Tree-SHA512: 94464f781cf70a5616f7cea2014ae0a97a338c34411cc989c60389de2ce00368374811db78c919bda30e0ebf341fb830998a5e97c124dd8afc8feb726cedfd3a
2021-07-15 11:07:35 -05:00
MarcoFalke
45508c041b Merge #17641: Add unit test for leveldb creation with unicode path
70ed2ab7ef9e7ebf56f77b7c410a345ff455938f Add unit test for DB creation with unicode path (Aaron Clauson)

Pull request description:

  An issue arose when attempting to switch back to the main repo version of leveldb when the bitcoin data directory uses a unicode path. The leveldb windows file IO wrapper was using the *A ANSI win32 calls instead of the Unicode *W ones. This unit test will catch if the path created by leveldb doesn't match what we're expecting. For more info see https://github.com/google/leveldb/issues/755.

ACKs for top commit:
  laanwj:
    ACK 70ed2ab7ef9e7ebf56f77b7c410a345ff455938f

Tree-SHA512: fc6dbd3aa26a439016e63e8d4d931f218ce99094fc7887a13b54562ad4133047020288ecbcd622a8309f422ee1eda5df50bcb8c8e44442af36ed57b22c069004
2021-07-15 11:07:17 -05:00
fanquake
316ae85508 Merge #17606: qt, refactor: Use proper classes for Ui::*
93352d261fa4e1518a4f006de157ff5a2fc4c819 qt: Use proper class for Ui::ReceiveCoinsDialog (Hennadii Stepanov)
87819046432a24fa8a7ec5c115eae4df0d281245 qt: Fix class name of Ui::ModalOverlay (Hennadii Stepanov)

Pull request description:

  Use proper classes for:
  - `Ui::ModalOverlay` to remove `<customwidget>` entry
  - `Ui::ReceiveCoinsDialog` to be consistent with the code base

  This PR does not change behavior.

ACKs for top commit:
  jonasschnelli:
    Tested ACK 93352d261fa4e1518a4f006de157ff5a2fc4c819 - ran this on top of master and tested the modal overlay on initial mainnet sync.
  laanwj:
    code review ACK 93352d261fa4e1518a4f006de157ff5a2fc4c819

Tree-SHA512: faeed8e86dbf5355505defcdb7e1db07d6a6005ee5eb07367b00f6aa122dd8ad34f8372d4bae7b29c0eac87b538a33157e19328be2876135e8a6376a3197f1bc
2021-07-15 11:07:17 -05:00
fanquake
89af1a9f1e Merge #17532: test: add functional test for non-standard txs with too large scriptSig
8f2d7737cc236b6122f30e31856eb3181960fba1 test: add functional test for non-standard txs with too large scriptSig (Sebastian Falbesoner)

Pull request description:

  Approaches another missing functional test of issue #17394 (counterpart to unit test in PR #17480, Commit 5e8a56348b): A transaction is rejected by the mempool with reason `"scriptsig-size"` if any of the inputs' scriptSig is larger than 1650 bytes.

ACKs for top commit:
  MarcoFalke:
    ACK 8f2d7737cc236b6122f30e31856eb3181960fba1
  instagibbs:
    ACK 8f2d7737cc

Tree-SHA512: 7a45b8a4181158be3e3b91756783ddf032f132ca8780dc35fac91b2df2149268f784d28ac56005135c4d86a357c57805c5a54b8155f0d049932844b18dc03992
2021-07-15 11:07:17 -05:00
Wladimir J. van der Laan
7d66e6647b
Merge #14356: fix converttopsbt permitsigdata arg, add basic test
88a79cb436b30b39d37d139da723f5a31e9d161b fix converttopsbt permitsigdata arg, add basic test (Gregory Sanders)

Pull request description:

  The final check for extraneous sigdata has a flipped boolean, resulting in incorrect behavior.

  Resolves https://github.com/bitcoin/bitcoin/issues/14355

Tree-SHA512: 5157a74b8ddebd7d836fba96765c4d7ed15a73d4289817353d3566a0f6803bd4bbc3f936735c517c7a83a6cbdb4052b9c61d23f6cc4ad00a6077278cd51adbd4
2021-07-15 04:52:38 +03:00
UdjinM6
791c7c75eb
Merge pull request #4249 from PastaPastaPasta/backport-triv-pr10
backport: 'trivial' pr10
2021-07-15 04:20:41 +03:00
PastaPastaPasta
8ef6ddead0
trivial: follow-up from 4186 review, add new-line at end of file (#4248) 2021-07-15 03:54:31 +03:00
PastaPastaPasta
f13d26dbfe
Dashification
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-07-14 18:46:13 -05:00
fanquake
f74aea23f1
Merge #18577: doc: Correct scripted-diff example link
478c11dde326e2ff0480c14f76f9f6b52a7bdfd0 Correct scripted-diff example link (Yahia Chiheb)

Pull request description:

ACKs for top commit:
  fanquake:
    ACK 478c11dde326e2ff0480c14f76f9f6b52a7bdfd0

Tree-SHA512: 3bc741a79db9bd7abb17ef11f697b768565ec01303a5823ee6a7d8dfa6e888a99a15e9eda69f97a912abc3fd56a54f698f9a580596511bc9bcf62a6870b273f6
2021-07-14 18:44:45 -05:00
fanquake
8c4a371dfd
Merge #18513: doc: fix git add argument
4928a995e9799c6c7ea84fa1efc4fef5b2ff7683 [doc] fix git add argument (Michael Polzer)

Pull request description:

  [`A`](https://git-scm.com/docs/git-add#Documentation/git-add.txt--A) is the correct flag.

ACKs for top commit:
  fanquake:
    ACK 4928a995e9799c6c7ea84fa1efc4fef5b2ff7683 - checked that [`A`](https://git-scm.com/docs/git-add#Documentation/git-add.txt--A) and not `a` is the correct flag.

Tree-SHA512: 7e656ca9688b04ad2ef577aa1847799a34a377f5e6dfe4fd052a95d3dd98798dc10957e7f54164900ac1271f05e788ec4861026f53b910e369b0845532387cf4
2021-07-14 18:44:44 -05:00
MarcoFalke
c3a80793d1
Merge #18379: doc: Comment fix merkle.cpp
5b59a19731827398aa32754d1f327178247d3199 Update merkle.cpp (4d55397500)

Pull request description:

  Change comment from `The reason is that if the number of hashes in the list at a given time
  is odd`, to ` The reason is that if the number of hashes in the list at a given level
         is odd` (to be a bit more precise: replacing `time` with `level`)

  <!--
  *** Please remove the following help text before submitting: ***

  Pull requests without a rationale and clear improvement may be closed
  immediately.
  -->

  <!--
  Please provide clear motivation for your patch and explain how it improves
  Bitcoin Core user experience or Bitcoin Core developer experience
  significantly:

  * Any test improvements or new tests that improve coverage are always welcome.
  * All other changes should have accompanying unit tests (see `src/test/`) or
    functional tests (see `test/`). Contributors should note which tests cover
    modified code. If no tests exist for a region of modified code, new tests
    should accompany the change.
  * Bug fixes are most welcome when they come with steps to reproduce or an
    explanation of the potential issue as well as reasoning for the way the bug
    was fixed.
  * Features are welcome, but might be rejected due to design or scope issues.
    If a feature is based on a lot of dependencies, contributors should first
    consider building the system outside of Bitcoin Core, if possible.
  * Refactoring changes are only accepted if they are required for a feature or
    bug fix or otherwise improve developer experience significantly. For example,
    most "code style" refactoring changes require a thorough explanation why they
    are useful, what downsides they have and why they *significantly* improve
    developer experience or avoid serious programming bugs. Note that code style
    is often a subjective matter. Unless they are explicitly mentioned to be
    preferred in the [developer notes](/doc/developer-notes.md), stylistic code
    changes are usually rejected.
  -->

  <!--
  Bitcoin Core has a thorough review process and even the most trivial change
  needs to pass a lot of eyes and requires non-zero or even substantial time
  effort to review. There is a huge lack of active reviewers on the project, so
  patches often sit for a long time.
  -->

ACKs for top commit:
  MarcoFalke:
    ACK 5b59a19731827398aa32754d1f327178247d3199
  instagibbs:
    ACK 5b59a19731

Tree-SHA512: 30d29b9855b30de8b54033ca4884cfb5bf8ab9e52cf61da237abba0e15ebff947c65f8ba82175694bc60ee0d54f940a098cadcb0404d3c3bcf577006ab0561a5
2021-07-14 18:44:44 -05:00
Wladimir J. van der Laan
9c6b782196
Merge #18283: doc: Explain rebase policy in CONTRIBUTING.md
fa1244783ccb4798af4906ac6be5a38df241fa38 doc: Explain rebase/squash policy in CONTRIBUTING.md (MarcoFalke)

Pull request description:

ACKs for top commit:
  hebasto:
    re-ACK fa1244783ccb4798af4906ac6be5a38df241fa38, typos fixed.
  laanwj:
    ACK fa1244783ccb4798af4906ac6be5a38df241fa38

Tree-SHA512: b8f790a8ffa4f59f26b64befbea8acd92f3c548e577c35750a60dde94b4340258a540ad0db60a6de650db0156cbff9e1330c589c300db5253531fe6a16cdbcc9
2021-07-14 18:44:43 -05:00
MarcoFalke
545139e5c1
Merge #17159: doc: Add a note about backporting
2a6bce482c13cff37c1af00231265de4656a454b doc: Add a note about backporting (Carnhof Daki)

Pull request description:

  See laanwj's comment in #17158
  https://github.com/bitcoin/bitcoin/pull/17158#issuecomment-542627090

Top commit has no ACKs.

Tree-SHA512: ac5248a796050ce1a5bd0718955f941f6a3c025e192599948f12566eb55296079404b999676b9a2c8fe10616fc8334698dfa415af0fb4db6c98038d52218af1f
2021-07-14 18:44:43 -05:00
Wladimir J. van der Laan
a8a23d8dd6
Merge #17431: Remove unnecessary forward declaration
3d133482b20c0acc03cdbe5f9104ae8dedde8e4d Remove unnecessary forward declaration (Mark Erhardt)

Pull request description:

  This removes an unnecessary forward declaration.

ACKs for top commit:
  jnewbery:
    Tested ACK 3d133482b20c0acc03cdbe5f9104ae8dedde8e4d
  laanwj:
    ACK 3d133482b20c0acc03cdbe5f9104ae8dedde8e4d

Tree-SHA512: 9e5b14e861c2b9fa2d7707ed67c4667540e9812a762e00f5039691eeca82390eb7462d20ad781d4e8c9111517e989da7aef60b112ab33abb774e32d9845b5459
2021-07-14 18:44:42 -05:00
fanquake
ecbaf20937
Merge #17393: doc: Added regtest config for linearize script
582e66b6e75d58033987a7b0474226cfdd724ce0 doc: Added regtest config for linearize script (Gr0kchain)

Pull request description:

  Updated the example-linearize.cfg file to include support for the regtest chain network config which is used by the ./linearize-data.py

  Problem:
  Without the regtest magic, genesis hash and path config, the `linearize-data.py` script cannot generate a bootstrap.dat file.

  Example:

  ./linearize-data.py ./linearize.cfg
  Read 102 hashes
  Genesis block not found in hashlist

  Solution:

  Added netmagic, genesis and input example parameters to file.

  Resolution

  1. Starting bitcoind in regtest mode
  2. bitcoin-cli generatetoaddress 101 $(bitcoin-cli getnewaddress)
  3. ./linearize-hashes.py ./linearize.cfg > ./hashlist.txt
  4. ./linearize-data.py ./linearize.cfg

  ```
  $ ./linearize-data.py ./linearize.cfg
  Read 102 hashes
  Input file /Users/gr0kchain/.bitcoin/regtest/blocks/blk00000.dat
  Output file /Users/gr0kchain/Downloads/bootstrap.dat
  Done (102 blocks written)
  ```

ACKs for top commit:
  fanquake:
    ACK 582e66b6e75d58033987a7b0474226cfdd724ce0

Tree-SHA512: 699e92e740e68e2e5190ba37538efbbe3e4d4e725ebd6af704a0cf5517683b691754f7ea097bf840845d2b53b793c63258d406e9bd37922db810cf58bed053c3
2021-07-14 18:44:42 -05:00