the warning before test 4r is generated by the check_z_mergetoaddress
at line 459, which moves all the sapling funds into taddr_2 and thus
expects (sapling_balance - DEFAULT_FEE) to show up into taddr_2.
However, the check_z_mergetoaddress_parallel at line 418 had already
funded taddr_2 (with the sum of taddr_1 and taddr_3), and so we need to
add that to the amount of money that check_z_mergetoaddress at line 459
expects to find.
fixes#5863
The span reloading was causing a use-after-free bug at the point
the old span was exited.
This reverts commit b517be4334.
As a result, `setlogfilter` will not be able to change whether
the peer tracing span is enabled (or whether IP addresses are
logged) for existing peers. That can be fixed later (#5867).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
We still depend on it indirectly, but we don't use it directly anymore
since we upstreamed our patch to `metrics-exporter-prometheus`.
`thiserror` is also only used by the wallet tool, so has been reordered
accordingly.
`hyper 0.14.18` stops building the C libraries by default (after opt-in
support was added via a new flag in nightly Cargo), which means we no
longer have the problem of the `cdylib` build requiring a linker to be
hooked up to the Rust build when all we want is a `staticlib`.
For consistency, we serialize the `finalState` field in the
same (sparse) encoding as Sapling and Sprout use. In the future
we may want to update this to the dense encoding that
incrementalmerkletree::bridgetree::Frontier uses, but that's not
necessary for the moment.
In zcash/zcash#5762 we altered the gtest runner to turn on logging to
stdout instead of dropping the logs, to make figuring out test failures
easier. However, this also meant the logs would be displayed for tests
that succeeded, and it was confusing to see `ERROR` log lines present.
We now have a test-specific initialization method for tracing that uses
synchronous logging instead of a background thread, and only logs to a
file. In the gtests, we initialize this with a new temporary file, and
add a gtest event listener that clears the file at the start of each
test, and then prints its contents if the test fails.
Example test output:
```
[ RUN ] ChecktransactionTests.CheckVpubNotBothNonzero
gtest/test_checktransaction.cpp:39: Failure
Expected equality of these values:
state.GetRejectReason()
Which is: "bad-txns-vpubs-both-nonzero"
"bad-txns-vpubs-both-nonzer"
--- Logs:
ERROR main: CheckTransaction(): joinsplit.vpub_new and joinsplit.vpub_old both nonzero
---
[ FAILED ] ChecktransactionTests.CheckVpubNotBothNonzero (0 ms)
```
Closeszcash/zcash#5766.
In #5809, we attempted to fix the assumption that on startup, the
wallet's best chain was at the same position as the node's chain tip.
This did not account for a condition where the node's block index
might not contain the block corresponding to the wallet's best chain,
because the node had crashed before the block index containing that
block could be written to disk.
This commit adds handling so that the `ThreadNotifyWallets` thread
will not start until the wallet's best block has been restored
to the node's block index and we're able to obtain a pointer to
that state.