Commit Graph

21706 Commits

Author SHA1 Message Date
Kittywhiskers Van Gogh
59b9725d23 merge bitcoin#20641: Use Qt top-level build facilities 2022-04-26 20:36:54 +05:30
Kittywhiskers Van Gogh
627a2d66ff merge bitcoin#21497: Do not opt-in unused CoreWLAN stuff in depends for macOS 2022-04-26 20:36:54 +05:30
Kittywhiskers Van Gogh
1658dc4d67 merge bitcoin#20520: Do not force Precompiled Headers (PCH) for building Qt on Linux 2022-04-26 20:36:54 +05:30
Kittywhiskers Van Gogh
65f779489d partial bitcoin#21694: Use XLIFF file to provide more context to Transifex translators
Excludes 35d52397e72f3ab96a7797148666b501d50b445d
2022-04-26 20:36:54 +05:30
Kittywhiskers Van Gogh
7b69a4cb42 merge bitcoin#21654: Make Qt rcc output always deterministic 2022-04-26 20:36:54 +05:30
Kittywhiskers Van Gogh
b9b9473f55 merge bitcoin#21655: No longer need to set QT_RCC_TEST=1 for determinism 2022-04-26 20:36:54 +05:30
Kittywhiskers Van Gogh
6bfd84a929 merge bitcoin#21708: Drop pointless sed commands 2022-04-26 20:36:54 +05:30
Kittywhiskers Van Gogh
dfe84d6552 merge bitcoin#23580: patch qt to explicitly define previously implicit header include 2022-04-26 20:36:53 +05:30
Kittywhiskers Van Gogh
0ab6ab79e4 merge bitcoin#21495: Fix static builds on macOS Big Sur 2022-04-26 20:36:08 +05:30
Kittywhiskers Van Gogh
ae45b570c2 partial bitcoin#17227: Add Android packaging support 2022-04-26 20:36:08 +05:30
UdjinM6
f108947cec
Translations 202202 (#4691)
* make translate

* ru

* fi

* 100%: es, fi, fr, it, ja, ko, nl, pl, pt, sk, th, tr, zh_TW
2022-04-26 11:21:57 +03:00
PastaPastaPasta
80d97381c2
refactor: implement irange::range and use it (#4788)
* refactor: implement irange::range and use it

* misc fixes

* Apply suggestions from code review

* compilation fixes

* suggestions

* fix: fix linter

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-04-26 02:40:41 +03:00
PastaPastaPasta
80a4360389
fix: bump dkgBadVotesThreshold to 80% (#4806) 2022-04-26 01:57:11 +03:00
UdjinM6
fd7786e04b
Merge pull request #4804 from PastaPastaPasta/develop-trivial-2022-04-25
trivial backports 2022 04 25
2022-04-26 00:51:36 +03:00
PastaPastaPasta
4a209adb1f
refactor(coinjoin): add GUARDED_BY annotation to mapDSTX (#4789) 2022-04-25 23:43:30 +03:00
Kittywhiskers Van Gogh
1763f727b5 merge bitcoin#21376: Qt 5.12.10 2022-04-26 00:54:10 +05:30
UdjinM6
40c320cad8
trivial/lint: tweak lint-spelling.sh and fix typos (#4802)
* lint: exclude 3-rd party libs from spell-checks

* trivial: fix typos
2022-04-25 22:13:24 +03:00
UdjinM6
7fc9ced96d
tests: various fixes/cleanups (#4797)
* tests: move `move_to_next_cycle` to `DashTestFramework`

* tests: set correct defaults for `mine_cycle_quorum`

* tests: use correct quorum type in `create_islock`

* tests: fix `rpc_verifyislock.py`

* tests: fix `feature_llmq_is_cl_conflicts.py`

* tests: isolate zmq subscribers in `interface_zmq_dash.py`

this lets us call `test_*_publishers()` in any order and any number of times

* tests: check zmq for both deterministic and non-deterministic islocks
2022-04-25 22:12:04 +03:00
Odysseas Gabrielides
a2e1f46cf4
Edge case fix for Rotation (#4803)
* Edge case fix

* Simpler syntax

* add a bit of documentation, and adjust scopes

* use a switch statment

* adjust how returning happens

Co-authored-by: pasta <pasta@dashboost.org>
2022-04-25 22:11:44 +03:00
MarcoFalke
9a01bb32fe Merge #20760: test: Set correct nValue for multi-op-return policy check
fad140e311028f904635126e3c77352afac1b75e test: Set correct nValue for multi-op-return policy check (MarcoFalke)

Pull request description:

  `CTxOut::nValue` is default-initialized to `-1`. The dust-threshold for `OP_RETURN` outputs is `0`. Thus, the policy failure would be `dust` instead of `multi-op-return`. The test only passes because the dust check is currently not run.

  Avoid that confusion by setting the value to `0`, to ensure the dust check passes.

ACKs for top commit:
  theStack:
    ACK fad140e311028f904635126e3c77352afac1b75e

Tree-SHA512: f0c7a68eb2c573d6595b2b129fa8fa2a34fa35c17691f448bf1c54ccf66059c37562e7480cde7b51c4de677038d7717873da4257147a5f60acc8bbcd25fb7e3f
2022-04-25 14:02:48 -05:00
Wladimir J. van der Laan
49e8ca6966 Merge #20469: build: Avoid secp256k1.h include from system
e95aaefe2540cb76969818fcc2ff77d33448ed5a build: Avoid secp256k1.h include from system (Niklas Gögge)

Pull request description:

  While building i ran into an error because i had a version of `secp256k1.h` under `/usr/local/include` that was incompatible with the secp256k1 code in the repository. This caused a problem because `$(BOOST_CPPFLAGS)` contained `-I/usr/local/include` and the include paths are searched by the compiler in order from left to right, so in the end `$(BITCOIN_INCLUDES)` contained `-I/usr/local/include` before `-I$(srcdir)/secp256k1/include` which caused the compiler to find  `secp256k1.h` under `/usr/local/include`.

  Looking at git blame i am wondering how this has not happened to anyone else in several years: cb89e18845/src/Makefile.am (L25)

  I am on macOS 10.15.

ACKs for top commit:
  laanwj:
    Code review ACK e95aaefe2540cb76969818fcc2ff77d33448ed5a
  hebasto:
    ACK e95aaefe2540cb76969818fcc2ff77d33448ed5a, tested on macOS 11 Big Sur by adding `#error` into `/usr/local/include/secp256k1.h`.

Tree-SHA512: 1f0b395725936c179ab60dee3582ec7b21e2f9c0f1895e160d84a487cf0db16d0c7aa47d05800e0aded31685b4362056cac9b9ecca1bb8c308a4c5a810e8dc1d
2022-04-25 14:02:48 -05:00
Wladimir J. van der Laan
a193964e0e Merge #20358: src/randomenv.cpp: fix build on uclibc
330cb33985d0ce97c20f4a0f0bbda0fbffe098d4 src/randomenv.cpp: fix build on uclibc (Fabrice Fontaine)

Pull request description:

  Check for HAVE_STRONG_GETAUXVAL or HAVE_WEAK_GETAUXVAL before using
  getauxval to avoid a build failure on uclibc

  Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

ACKs for top commit:
  laanwj:
    Code review ACK 330cb33985d0ce97c20f4a0f0bbda0fbffe098d4

Tree-SHA512: 94fbbdb0e859f0220d64b2d04565f575b410327f080125fec7fb74205d0bea0e8133561c83a696033d6dc377871133871b72c1aad19aca61e972ce67e0fdf707
2022-04-25 14:02:48 -05:00
fanquake
0f79a4002b Merge #20082: [bugfix] random: fixes read buffer to use min rather than max
bd5215103eb3985c1622eddea45a040e6173829c random: fixes read buffer resizing in RandAddSeedPerfmon (Ethan Heilman)

Pull request description:

  As shown below when resizing the read buffer `vData` `std::max((vData.size() * 3) / 2, nMaxSize)` is used. This means that the buffer size immediately jumps to `nMaxSize`. I believe the intend of this code is to grow the buffer size through several steps rather than immediately resize it to the max size.

  ```cpp
      std::vector<unsigned char> vData(250000, 0);
      long ret = 0;
      unsigned long nSize = 0;
      const size_t nMaxSize = 10000000; // Bail out at more than 10MB of performance data
      while (true) {
          nSize = vData.size();
          ret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", nullptr, nullptr, vData.data(), &nSize);
          if (ret != ERROR_MORE_DATA || vData.size() >= nMaxSize)
              break;
          vData.resize(std::max((vData.size() * 3) / 2, nMaxSize)); // Grow size of buffer exponentially
      }
  ```

  vData always starts at size 250,000 and nMaxSize is always 10,000,000 so the first time this line is reached:
  ```cpp
  vData.resize(std::max((vData.size() * 3) / 2, nMaxSize));
  ```
  the effect will always be to resize vData to nMaxSize. Then because the loop terminates when vData.size >= 10,000,000 only one resize operation will take place.

  To fix this issue we replace `std::min` with `std::max`

  This PR also adds a comment clarifying the behavior of this function the first time it is called.

ACKs for top commit:
  fanquake:
    ACK bd5215103eb3985c1622eddea45a040e6173829c - thanks for taking a look at this Ethan. Swapping from `std::max` to `std::min` here certainly seems correct.

Tree-SHA512: 7c65f700e5bbe44bc2f1ffdcdc99ec19c542894c95b5ee9791facd09d02afae88d1f8f35af129719e4860db94bc790856e7adb1d218a395381e7c2913b95f1d0
2022-04-25 14:02:48 -05:00
Wladimir J. van der Laan
b582fbb9a6 Merge #18359: build: fix sysctl() detection on macOS
e90e3e684ffa7b25f0dfb5b45e70bb0c358261fb build: fix sysctl() detection on macOS (fanquake)

Pull request description:

  [`sysctl()` on *BSD](https://www.unix.com/man-page/FreeBSD/3/sysctl/) takes a "const int *name", whereas [`sysctl()` on macOS](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/sysctl.3.html)
  it takes an "int *name". So our configure check and `sysctl()` detection on
  macOS currently fails:

  ```bash
  /usr/include/sys/sysctl.h:759:9: note: candidate function not viable:
  	no known conversion from 'const int [2]' to 'int *' for 1st argument
  int     sysctl(int *, u_int, void *, size_t *, void *, size_t);
  ```

  The simplest change seems to be to change the param to a "int *name", which
  will work during configure on macOS and *BSD systems.

  For consistency I've changed both calls, but note that macOS doesn't
  have `KERN_ARND`, so that check will always fail regardless. We can revert/add
  documentation if preferred.

ACKs for top commit:
  laanwj:
    Re-ACK e90e3e684ffa7b25f0dfb5b45e70bb0c358261fb

Tree-SHA512: 29e9348136fc72882f63079bf10d2490e845d7656aae2c003e282bea49dd2778204a7776a67086bd88c2852af9a07dd04ba358eede7e37029e1c10f73c85d6a5
2022-04-25 14:02:48 -05:00
fanquake
0c3a7469fb Merge #18229: random: drop unused MACH time headers
d36146009fb3fc9b9a772823b4df139a85173481 Drop unused mach time headers (Ben Woosley)

Pull request description:

  Now that we're no longer special-casing clock usage for MacOS (see #17800), we're
  not referencing anything defined in these headers.

  Incidentally, this removes our last reference to the `__MACH__` system def. 🎉

ACKs for top commit:
  jonasschnelli:
    utACK d36146009fb3fc9b9a772823b4df139a85173481
  fanquake:
    ACK d36146009fb3fc9b9a772823b4df139a85173481 - thanks.

Tree-SHA512: 246045b0683a705ad034416e8ace2024e652026a6c0517b6797320e52fc18a6e111ec2e405ca40653bd1d6421bb7755232e8fec22651fff8e448eb7d5646a954
2022-04-25 14:02:48 -05:00
Wladimir J. van der Laan
b5fd72c9d4 Merge #17800: random: don't special case clock usage on macOS
dc9305b6162ec615ff5fb2876e4f312051b543af random: don't special case clock usage on macOS (fanquake)

Pull request description:

  `clock_gettime()`, `CLOCK_MONOTONIC` and `CLOCK_REALTIME` are all available for use on
  macOS (now that we require macOS >=10.12 and build against 10.14). Use them rather than the [deprecated](https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/KernelProgramming/Mach/Mach.html) `mach_timespec_t` time API.

  I mentioned the possibility for this change [in #17270](https://github.com/bitcoin/bitcoin/pull/17270#discussion_r346090606).

  [master](1dbf3350c683f93d7fc9b861400724f6fd2b2f1d):
  ```bash
  2019-12-23T20:49:43Z Feeding 216 bytes of dynamic environment data into RNG
  2019-12-23T20:50:43Z Feeding 216 bytes of dynamic environment data into RNG
  ```

  This PR:
  ```bash
  2019-12-23T20:32:41Z Feeding 232 bytes of dynamic environment data into RNG
  2019-12-23T20:33:42Z Feeding 232 bytes of dynamic environment data into RNG
  ```

  ~~Depends on #16392.~~ Merged.

ACKs for top commit:
  laanwj:
    ACK dc9305b6162ec615ff5fb2876e4f312051b543af

Tree-SHA512: 18c2f336ea628f9cf7339b817381d230a18893fd9c0351bf99a39ca6f45c5b0a20af9d599d48d6c09515627d5edafa91337c17f9f790264251d2cdcb3763bbd5
2022-04-25 14:02:48 -05:00
Wladimir J. van der Laan
d195881704 Merge #17507: random: mark RandAddPeriodic and SeedPeriodic as noexcept
55b2cb199c276781b6daa5438af2da57dea3ac52 random: mark RandAddPeriodic and SeedPeriodic as noexcept (fanquake)
461e547877da0c04db69e067c923cc4540aab03a doc: correct random.h docs after #17270 (fanquake)

Pull request description:

  The usage of `MilliSleep()` in SeedPeriodic (previously SeedSleep) was
  [removed](d61f2bb076) in #17270, meaning it, and its users can now be marked `noexcept`.

  This also corrects the docs in random.h for some of the changes in #17270.

ACKs for top commit:
  practicalswift:
    ACK 55b2cb199c276781b6daa5438af2da57dea3ac52
  laanwj:
    ACK 55b2cb199c276781b6daa5438af2da57dea3ac52
  sipa:
    ACK 55b2cb199c276781b6daa5438af2da57dea3ac52

Tree-SHA512: 672d369796e7c4f9b4d98dc545e5454999fa1bef373871994a26041d6163c58909e2255e4f820d3ef011679aa3392754eb57477306a89f5fd3d57e2bd7f0811a
2022-04-25 14:02:43 -05:00
Wladimir J. van der Laan
0d18eae6d0 Merge #17527: Fix CPUID subleaf iteration
f93fc61c65d605eae2d3e2c98bdd30ae587fcdab Put bounds on the number of CPUID leaves explored (Pieter Wuille)
ba2c5fe1477cec80d7e02f824daba21a1021758e Fix CPUID subleaf iteration (Pieter Wuille)

Pull request description:

  This fixes #17523.

  The code to determine which CPUID subleaves to explore was incorrect in #17270. The new code here is based on Intel's reference documentation for CPUID (a document called "Intel® Processor Identification and the CPUID Instruction - Application Note 485", which I cannot actually find on their own website).

ACKs for top commit:
  laanwj:
    ACK f93fc61c65d605eae2d3e2c98bdd30ae587fcdab
  jonatack:
    ACK f93fc61c65d605eae2d3e2c98bdd30ae587fcdab code review, tested rebased on current master bb862d7 with Debian 4.19 x86_64
  mzumsande:
    ACK f93fc61, reviewed code and compared with the intel doc, tested on an AMD and an Intel processor.

Tree-SHA512: 2790b326fa397b736c0f39f25807bea57de2752fdd58bf6693d044b8cb26df36c11cce165a334b471f8e33724f10e3b76edab5cc4e0e7776601aabda13277245
2022-04-25 14:02:43 -05:00
PastaPastaPasta
476c25f3c7
Merge pull request #4800 from kittywhiskers/bye_bye_openssl
merge bitcoin#17270, #17265, #18825: remove openssl
2022-04-25 13:18:18 -05:00
Kittywhiskers Van Gogh
1a6c26154b merge bitcoin#18825: fix message for ECC_InitSanityCheck test 2022-04-25 15:29:52 +05:30
Kittywhiskers Van Gogh
2314ba4c99 merge bitcoin#17265: Remove OpenSSL 2022-04-25 15:29:52 +05:30
Kittywhiskers Van Gogh
946858204f merge bitcoin#17270: Feed environment data into RNG initializers 2022-04-25 15:29:51 +05:30
Kittywhiskers Van Gogh
c7c42fff3d revert dash#4683: remove the ability to opt-out from building openssl
This reverts commit b26eaf6954.
2022-04-25 15:18:55 +05:30
PastaPastaPasta
2fe55acb4c
refactor: resolve cppcheck warnings (#4799) 2022-04-25 12:34:05 +03:00
PastaPastaPasta
407873e024
refactor(coinjoin): remove CCriticalSection from coinjoin code, use mutexes instead (#4739)
* refactor: remove CCriticalSection from coinjoin code, use mutexes instead

* refactor(coinjoin): more annotations

* fix cs_coinjoin double-lock deadlock

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-04-25 12:28:37 +03:00
Kittywhiskers Van Gogh
43152b2b35
merge #17165: Remove BIP70 support (#4023)
* compat: remove bswap_* check on macOS

This was originally added in #9366 to fix the gui build, as
Protobuf would also define these macros. Now that we're no-longer
using Protobuf, remove the additional check.

* build: skip building OpenSSL lib_ssl

* build: remove OpenSSL from Qt build

More info available from:
https://doc.qt.io/qt-5/ssl.html#enabling-and-disabling-ssl-support

* build: remove EVP_MD_CTX_new detection

This was added in #9475 to fix LibreSSL compatibility for
BIP70, so is no longer required.

* build: remove SSL lib detection

* gui: update BIP70 support message

* build: remove BIP70 entries from macOS Info.plist

* gui: remove payment request file handling from OpenURI dialog

* gui: remove BIP70 Support

* build: remove protobuf from depends and contrib
2022-04-25 12:01:47 +03:00
PastaPastaPasta
685c122fef
fix(qt): fix crash when first enabling governance tab due to null-ptr deref (#4795)
Decided to also apply the same logic to the other items so that we don't do nullptr dereferences

replication
```
./src/qt/dash-qt --regtest --resetguisettings
Enable governance
shutdown
```
2022-04-22 01:01:29 +03:00
UdjinM6
11a0fd7773
instantsend: create islock/isdlock based on the quorum rotation activation status (#4790) 2022-04-21 04:57:46 +03:00
UdjinM6
6df95f689a
Merge pull request #4785 from PastaPastaPasta/develop-trivial-2022-04-20
trivial backports 2022 04 20
2022-04-20 23:40:58 +03:00
PastaPastaPasta
c2ecc0c721
Merge pull request #4731 from vijaydasmp/bp2001
Merge bitcoin#17251,17250,17279,17299,17306,15756,17203,17719
2022-04-20 14:08:24 -05:00
PastaPastaPasta
087e62588e
refactor(instantsend): make cs_db a Mutex, replace cs with multiple smaller mutexes (#4784)
* refactor(instantsend): make cs_db a Mutex

This introduces GetInstantSendLockByHashInternal and GetInstantSendLockHashByTxidInternal as they are called in Locked and Unlocked contexts. The Internal functions do not lock cs_db, the non-internal functions simply lock cs_db then call the internal function. This ensures saftety (all public functions lock cs_db immediately & all private functions have cs_db already locked) enforced via clang thread safety, while allowing us to use a Mutex here

* refactor(instantsend): remove CInstantSendManager::cs, replace it with cs_inputReqests, cs_creating, cs_pendingLocks, cs_nonLocked, cs_pendingRetry

LOCKS_EXCLUDED are used everywhere where the associated mutex is locked ensuring that deadlocks are impossible
2022-04-20 21:54:20 +03:00
PastaPastaPasta
8096e286e1
refactor(llmq): misc clang-tidy / other refactoring (#4777)
* clang-tidy: avoid implicit conversion to bool

* clang-tidy: pointer / reference adjustments

* clang-tidy: avoid implicit conversion to bool

* clang-tidy: use braces for if

* clang-tidy: don't use else after return

* clang-tidy: mark auto stuff as pointers / const pointers

* clang-tidy: make static

* clang-tidy: avoid implicit conversion to bool

* clang-tidy: use emplace back

* clang-tidy: avoid implicit conversion to bool, and use WITH_LOCK

* use WITH_LOCK

* clang-tidy: avoid implicit conversion to bool

* clang-tidy: use more const / * with auto

* refactor: adjust formatting, and move IsNull to .h

* refactor: remove unused functions

* Update src/llmq/clsig.h

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-04-20 21:48:54 +03:00
PastaPastaPasta
e0544cdb2e
fix(instantsend): avoid an iterator invalidation in pendingInstantSendLocks handling (#4787)
* fix(instantsend): avoid an iterator invalidation in pendingInstantSendLocks handling

this also removes the following, as it doesn't take into account deterministic / not deterministic
```
if (pendingInstantSendLocks.size() <= maxCount) {
    pend = std::move(pendingInstantSendLocks);
}
```

Also uses structured bindings

* suggestions

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-04-20 21:19:59 +03:00
PastaPastaPasta
a9aac3ba9f
refactor: introduce CSigBase which becomes the base class for CRecoveredSig, CSigShare and CSigSesAnn (#4776)
* refactor: introduce CSigBase which becomes the base class for CRecoveredSig, CSigShare and CSigSesAnn

* fix: add optional include
2022-04-20 21:17:57 +03:00
PastaPastaPasta
608a099c87
fix: adjust nWindowSize and nThresholdStart and nThresholdMin (#4786) 2022-04-20 21:12:58 +03:00
MarcoFalke
5b91002b21 Merge bitcoin/bitcoin#23692: mining, refactor: add m_mempool.cs thread safety lock assertions
275e9390e1c84ac021b3c781ee239ad9ba7b78d4 mining, refactor: add m_mempool.cs thread safety lock assertions (Jon Atack)

Pull request description:

  in src/node/miner to

  - BlockAssembler::addPackageTxs()
  - BlockAssembler::SkipMapTxEntry()
  - BlockAssembler::UpdatePackagesForAdded()

  These functions have thread safety lock annotations in their declarations but are missing the corresponding run-time lock assertions in their definitions.

  Per doc/developer-notes.md: "Combine annotations in function declarations with run-time asserts in function definitions."

ACKs for top commit:
  shaavan:
    ACK 275e9390e1c84ac021b3c781ee239ad9ba7b78d4. Thanks for catching and fixing this!

Tree-SHA512: 1c6f1ad1bbd94ff391fc8ce1e3b95d88bd3db5db804a1a5ef4636e54b29f5801f79aa9ed753d34c9a79a58cf01c7ed890e7681ff1c7b0f16335dc062bbac31cc
2022-04-20 09:04:29 -05:00
MarcoFalke
8aa0af8e62 Merge #18518: fuzz: Extend descriptor fuzz test
fa0189955ab0f458bac81f534cbd626e1b0ad2c1 fuzz: Extend descriptor fuzz test (MarcoFalke)

Pull request description:

ACKs for top commit:
  practicalswift:
    ACK fa0189955ab0f458bac81f534cbd626e1b0ad2c1

Tree-SHA512: 6d6a6417f06d90732bbf055ff54102530d6956f3082f1ff65598f790d588170768aee98e4835996876d28bca2a9c62f22fe122c3fc7eafd4b7660696f72f9835
2022-04-20 08:51:40 -05:00
fanquake
dc36f495de Merge #18211: test: Disable mockforward scheduler unit test for now
fab2527515e8db944ae044bea8580e2cd9414bcd test: Disable mockforward scheduler unit test for now (MarcoFalke)

Pull request description:

  This should be a workaround to fix #18174 in the short run and buy us more time to investigate the issue while ci runs are green again 🙏

ACKs for top commit:
  fanquake:
    ACK fab2527515e8db944ae044bea8580e2cd9414bcd - be good to get Travis back.
  laanwj:
    ACK fab2527515e8db944ae044bea8580e2cd9414bcd

Tree-SHA512: 027e86b3dfec203a464e5bf528e9933c208c36633c2d4bfcdbc10da1799637a5d6ea0a63af33a4174fb1ad7115df631a4cb838f56e31f4cbd15498e1e9fdf9cc
2022-04-20 08:51:35 -05:00
fanquake
abb82314c9 Merge #17897: init: Stop indexes on shutdown after ChainStateFlushed callback.
9dd58ca611f6f2b59c25d727a4e955333525d345 init: Stop indexes on shutdown after ChainStateFlushed callback. (Jim Posen)

Pull request description:

  Replaces https://github.com/bitcoin/bitcoin/pull/17852.

  Currently, the latest index state may not be committed to disk on shutdown. The state is committed on `ChainStateFlushed` callbacks and the current init order unregisters the indexes as validation interfaces before the final `ChainStateFlushed` callback is called on them.

  Issue identified by paulyc.

  For review: an alternative or supplemental solution would be to call `Commit` at the end of `BaseIndex::Stop`. I don't see any harm in doing so and it makes the less prone to user error. However, the destructor would have to be modified to not call `Stop` because `Commit` calls a virtual method, so I figured it wasn't worth it. But I'm curious how others feel.

ACKs for top commit:
  fjahr:
    tested ACK 9dd58ca611f6f2b59c25d727a4e955333525d345
  paulyc:
    > Code review ACK [9dd58ca](9dd58ca611), but failed to test because I can't reproduce the original problem.
  kallewoof:
    Tested ACK 9dd58ca611f6f2b59c25d727a4e955333525d345
  promag:
    Code review ACK 9dd58ca611f6f2b59c25d727a4e955333525d345, but failed to test because I can't reproduce the original problem.

Tree-SHA512: 2918380b699833cb7eab07456d1667dbf8ebbe2d2b5988300a3cf5b6a6cfc818b6d9086e1936ffe7881f67e409306c4b91d61a08a169cfd0a301383479d4f3cb
2022-04-20 08:51:32 -05:00
Wladimir J. van der Laan
db07ef8196 Merge #16960: doc: replace outdated OpenSSL comment in test README
27fcb40fc0c9ba5608a982be7372924b1edefb17 doc: replace outdated OpenSSL comment in test README (fanquake)

Pull request description:

  The OpenSSL dependency was removed in #15826.

ACKs for top commit:
  laanwj:
    ACK 27fcb40fc0c9ba5608a982be7372924b1edefb17
  theStack:
    ACK 27fcb40fc0

Tree-SHA512: eb7a3b18fefa91e6f27c50fa065d6cc330f7b633ae8ee51145cdeec4df51dea5155f0d1fa91e75f1202adef04e063f3eda12773cd00a093f29f5a5e83c4fda73
2022-04-20 08:51:24 -05:00