- ensure header namespaces and end comments are correct
- add missing header end comments
- ensure minimal formatting (add newlines etc.)
Zcash: left out change to src/policy/policy.h which we don't yet have.
Avoid calling gettimeofday every time through the benchmarking loop, by keeping
track of how long each loop takes and doubling the number of iterations done
between time checks when they take less than 1/16'th of the total elapsed time.
Benchmarking framework, loosely based on google's micro-benchmarking
library (https://github.com/google/benchmark)
Wny not use the Google Benchmark framework? Because adding Even More Dependencies
isn't worth it. If we get a dozen or three benchmarks and need nanosecond-accurate
timings of threaded code then switching to the full-blown Google Benchmark library
should be considered.
The benchmark framework is hard-coded to run each benchmark for one wall-clock second,
and then spits out .csv-format timing information to stdout. It is left as an
exercise for later (or maybe never) to add command-line arguments to specify which
benchmark(s) to run, how long to run them for, how to format results, etc etc etc.
Again, see the Google Benchmark framework for where that might end up.
See src/bench/MilliSleep.cpp for a sanity-test benchmark that just benchmarks
'sleep 100 milliseconds.'
To compile and run benchmarks:
cd src; make bench
Sample output:
Benchmark,count,min,max,average
Sleep100ms,10,0.101854,0.105059,0.103881
Update libsodium download-path
This PR fixes the macOS build that is currently failing due to the download path for Libsodium changing - mentioned in issue #4295
depends macOS: hide linker visibility warnings
Closes https://github.com/zcash/zcash/issues/4255
Tested that all lines with `ld: warning: direct access in` are gone from build log.
Bitcoin wallet PRs 3
Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#7687
- bitcoin/bitcoin#11116
- Excludes SegWit tests
- Excludes `isInvalid` code (which is part of the SegWit support structure)
- bitcoin/bitcoin#13002
- Excludes changes to `importwallet` (missing bitcoin/bitcoin#11667)
- Excludes changes to `ProcessImport` (missing bitcoin/bitcoin#7551)
- Third commit was rewritten to add an internal SigVersion argument (which we didn't have because it was added to support SegWit logic).
Such outputs can still be watched, and signed for, but they aren't treated as valid payments.
That means they won't cause transactions to appear in listtransactions, their outputs to be
shown under listunspent, or affect balances.
Inside IsMine we care about the distinction between scriptPubKey execution
and P2SH redeemScript execution. The consensus code does not care about this
distinction, and thus SigVersion does not have a field for P2SH. As the IsMine
code will care, it uses a separate enum with more fields.