-BEGIN VERIFY SCRIPT-
sed -i 's/__APPLE__/MAC_OSX/g' src/compat/byteswap.h src/util.cpp
-END VERIFY SCRIPT-
Zcash: Excludes byteswap.h change as we don't have bitcoin/bitcoin#9366.
flush witness cache (SetBestChain()) on clean shutdown
Closes#4596, follow-on to #4573. In addition to flushing witness data on shutdown, fix the RPC test that was preventing this change from being part of #4573.
metrics: Collect general stats before clearing screen
This prevents the metrics screen from flashing if locks are being held
by long-running processes, specifically cs_main during block validation.
We split up locking on cs_main and cs_vNodes to make obtaining the locks
easier, at the expense of potentially having slightly out-of-sync
statistics (which doesn't really matter, as all we are fetching from the
latter lock is the number of connected peers).
Send alert to put pre-Heartwood nodes into safe mode.
The alert targets nodes running protocol version <= 170010.
Heartwood-compatible nodes run protocol version >= 170011.
Fix "--disable-mining" build regression
closes#4634
Test by building with:
* `CONFIGURE_FLAGS="--disable-tests --disable-mining --disable-bench" zcutil/build.sh`
* `zcutil/distclean.sh`
* `CONFIGURE_FLAGS="--disable-mining" zcutil/build.sh`
After the second build, run `qa/zcash/full-test-suite.py`. Stop when it gets to the RPC tests, which will hang. The preceding parts of the test suite are all expected to pass.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
Pass HistoryNode through Rust FFI as a C array
`std::array<T>` is guaranteed to store `T` contiguously. However, there is
no guarantee that `sizeof(std::array<unsigned char, N>) == N`, which
prevents us from interpreting `std::array<std::array<unsigned char, N>, 32>`
as `&[[u8; N]]` on the Rust side of the FFI.
Instead, we define `HistoryNode` as a struct wrapping a C array, which
(as checked by `static_assert`) contains no padding.
This is equivalent to 82fe37d22b, which
fixed this issue when passing a slice of `HistoryEntry`s from C++ to Rust;
the bug fixed here is writing `HistoryNodes` from Rust into C++ memory.
This prevents the metrics screen from flashing if locks are being held
by long-running processes, specifically cs_main during block validation.
We split up locking on cs_main and cs_vNodes to make obtaining the locks
easier, at the expense of potentially having slightly out-of-sync
statistics (which doesn't really matter, as all we are fetching from the
latter lock is the number of connected peers).
Wallet must come before crypto, otherwise linking fails on some platforms.
Includes a tangentially-related general cleanup rather than making the Makefile
sloppier.
Verify that results correct (match known values), consistent (encrypt->decrypt
matches the original), and compatible with the previous openssl implementation.
Also check that failed encrypts/decrypts fail the exact same way as openssl.