Small httpserver.cpp backports
Also includes a change to the `uiInterface.NotifyBlockTip` signal API.
These remove merge conflicts from subsequent backports for `sync.h`.
Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#6859
- bitcoin/bitcoin#7112
- Only the non-QT changes.
- bitcoin/bitcoin#7966
- bitcoin/bitcoin#8421
- We already backported the second commit in zcash/zcash#2555
build: Remove a stray -lcrypto
zcash/zcash#4740 removed OpenSSL from our depends system, so we were
not satisfying this linker flag intentionally. Configurations where a
target OpenSSL could not be found by the linker, such as cross-compiles
and native macOS builds, were therefore failing. However, OpenSSL is
likely available in the system for all the "supported builders" (which
are all Linux-based), so the linker was likely being satisfied by that
library, enabling the previous PR to be merged.
By using the old HOST with -unknown, `make -C depends download` was
interpreting the download-linux step as a cross-compile, and attempting
to download a Rust stdlib for Linux that we weren't pinning (because we
don't support cross-compiling to x86_64 Linux - just build it native).
Follow-up to https://github.com/zcash/zcash/pull/4749.
zcash/zcash#4740 removed OpenSSL from our depends system, so we were
not satisfying this linker flag intentionally. Configurations where a
target OpenSSL could not be found by the linker, such as cross-compiles
and native macOS builds, were therefore failing. However, OpenSSL is
likely available in the system for all the "supported builders" (which
are all Linux-based), so the linker was likely being satisfied by that
library, enabling the previous PR to be merged.
Remove OpenSSL
Includes changes cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#7095
- bitcoin/bitcoin#11024
- bitcoin/bitcoin#17165
- Only the commit removing SSL lib detection (we have long since removed the rest).
- bitcoin/bitcoin#17265
- We had already migrated away from OpenSSL for randomness.
- bitcoin/bitcoin#17515
- Only the second commit.
Closes#145.
along with mutex/condvar/bind/etc.
httpserver handles its own interruption, so there's no reason not to use std
threading.
While we're at it, may as well kill the BOOST_FOREACH's as well.
Use std::unique_ptr for handling work items.
This makes the code more RAII and, as mentioned in the comment, is what
I planned when I wrote the code in the first place.
The named requirements for Allocator are here:
https://en.cppreference.com/w/cpp/named_req/Allocator
It gives the following requirements for `a.deallocate(p, n)`:
> Deallocates storage pointed to `p`, which must be a value returned by
> a previous call to `allocate` that has not been invalidated by an
> intervening call to `deallocate`. `n` must match the value previously
> passed to `allocate`. Does not throw exceptions.
This explicitly excludes both calling `secure_allocator::deallocate` on
`nullptr`, and throwing exceptions of any kind. We address the former by
asserting that `p != nullptr` (because `LockedPool::free` does support
`nullptr`), and we address the latter by adding the `noexcept` keyword
(which the example C++11 allocator on the page above also uses).