The latter soft-sets `-rescan` if corruption is detected, while the
former implicitly rescans as a side-effect of replaying the chain
history to the wallet.
The reindexing process will replay the chain history against the wallet
starting from genesis, so we can just rebuild the witness caches from
scratch to ensure consistency.
This integrates `cxxbridge` into the build system, adding its generated
source files to `libzcash`. We currently need to manually specify each
Rust file containing a bridge description.
We could also generate this in the main build with `cxxbridge --header`,
but we have the source from vendoring `cxxbridge`, and this simplifies
the automake integration slightly.
These are needed by cxx so that when it builds its internal C++ glue
logic, it uses the same C++ compiler and flags as our top-level build.
In particular, this ensures that it links against the libc++ symbols.
During testing of the previous fixes, the node entered a state where it
was possible to incorrectly dereference a map entry and crashed. These
changes address the most likely locations of the failed check.
Since the wallet ecosystem may not be fully updated to handle
v5 transaction parsing at the point of NU5 activation, some
nodes may prefer to construct V4 transactions when not including
Orchard transaction components.
This change adds a CLI flag that allows node users to specify
that preference.
Call sync.h primitives "locks" and "mutexes" instead of "blocks" and "waitable
critical sections" to match current coding conventions and c++11 standard
names.
This PR does not rename the "CCriticalSection" class (though this could be done
as a followup) because it is used everywhere and would swamp the other changes
in this PR. Plain mutexes should mostly be preferred instead of recursive
mutexes in new code anyway.
-BEGIN VERIFY SCRIPT-
set -x
set -e
ren() { git grep -l $1 | xargs sed -i s/$1/$2/; }
ren CCriticalBlock UniqueLock
ren CWaitableCriticalSection Mutex
ren CConditionVariable std::condition_variable
ren cs_GenesisWait g_genesis_wait_mutex
ren condvar_GenesisWait g_genesis_wait_cv
perl -0777 -pi -e 's/.*typedef.*condition_variable.*\n\n?//g' src/sync.h
-END VERIFY SCRIPT-
(cherry picked from commit bitcoin/bitcoin@190bf62be1)
They should also work with any other mutex type which std::unique_lock
supports.
There is no change in behavior for current code that calls these macros with
CCriticalSection mutexes.
(cherry picked from commit bitcoin/bitcoin@1382913e61)
Move AnnotatedMixin closer to where it's used, and after the DEBUG_LOCKORDER
function declarations so it can call them.
(cherry picked from commit bitcoin/bitcoin@ba1f095aad)