Also takes the opportunity to use more standard location for the lockfile and
improves the lock-conflict error to help a user if the fetcher crashed without
removing the lock or if they are running it from a distribution in which it’s
called `zcash-fetch-params` instead of `fetch-params.sh`.
Fixes#3925
This also
* renames `GetUnconfirmedBalance` to `GetUnconfirmedTransparentBalance`,
* reverts the `getunconfirmedbalance` RPC call to not accept `asOfHeight`,
* conditionalizes `getwalletinfo` to only include unconfirmed balances in calls
without `asOfHeight`, and
* removes the unused `Get*WatchOnlyBalance` functions.
on with the Equihash solution trimming:
* (counter) `zcashd.debug.memory.allocated_equihash_solutions` -
the number of Equihash solutions that have ever been allocated;
* (counter) `zcashd.debug.memory.trimmed_equihash_solutions` -
the number of Equihash solutions that were trimmed;
* (counter) `zcashd.debug.blocktree.trimmed_equihash_read_dbindex` -
the number of times a block index entry needed to be reread to
construct a block header because a solution had been trimmed;
* (counter) `zcashd.debug.blocktree.write_batch` -
the number of block tree batch write operations (calls to
`CBlockTreeDB::WriteBatchSync`);
* (counter) `zcashd.debug.blocktree.write_batch_read_dbindex` -
the number of times a block index entry needed to be reread
before being written during a block tree batch write operation.
These metrics are specific to `zcashd`; they are primarily intended
for performance debugging of this feature and should not be considered
stable.
Co-authored-by: Jack Grigg <thestr4d@gmail.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This removes the default `std::nullopt`[^1] and threads `asOfHeight` through the
call graph, only using `std::nullopt` where it is unconditionally correct (e.g.,
where we would be creating a tx, and thus need the actual chain tip).
This does not change deprecated or legacy operations.
[^1]: Having a default makes it easy to miss call sites that should be
updated. If a default is deemed useful, it should be added in a separate
commit, so that all call sites can be reviewed in an earlier commit.
and an incompatibility with Python 3.9 in the test framework that
affected the `receivedby` extended RPC test.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
When executing a Python script from within Python, rather than looking for
`python3` in /usr/local/bin and falling back to the script’s shebang line,
_always_ use the same Python that is executing the caller.
I don’t know why this script doesn’t just run `bitcoin_util_test.py`
directly (always using the shebang line), but I assume that is
intentional (but that should be documented). Otherwise, I’d prefer that
approach.