elements/src/bench
Wladimir J. van der Laan 3c40bc6726
Merge #15921: validation: Tidy up ValidationState interface
3004d5a12d [validation] Remove fMissingInputs from AcceptToMemoryPool() (John Newbery)
c428622a5b [validation] Remove unused first_invalid parameter from ProcessNewBlockHeaders() (John Newbery)
7204c6434b [validation] Remove useless ret parameter from Invalid() (John Newbery)
1a37de4b31 [validation] Remove error() calls from Invalid() calls (John Newbery)
067981e492 [validation] Tidy Up ValidationResult class (John Newbery)
a27a2957ed [validation] Add CValidationState subclasses (John Newbery)

Pull request description:

  Carries out some remaining tidy-ups remaining after PR 15141:

  - split ValidationState into TxValidationState and BlockValidationState (commit from ajtowns)
  - various minor code style tidy-ups to the ValidationState class
  - remove the useless `ret` parameter from `ValidationState::Invalid()`
  - remove the now unused `first_invalid` parameter from `ProcessNewBlockHeaders()`
  - remove the `fMissingInputs` parameter from `AcceptToMemoryPool()`, and deal with missing inputs the same way as other errors by using the `TxValidationState` object.

  Tip for reviewers (thanks ryanofsky!): The first commit ("[validation] Add CValidationState subclasses" ) is huge and can be easier to start reviewing if you revert the rote, mechanical changes:

  Substitute the commit hash of commit "[validation] Add CValidationState subclasses" for <CommitHash> in the commands below.

  ```sh
  git checkout <CommitHash>
  git grep -l ValidationState | xargs sed -i 's/BlockValidationState\|TxValidationState/CValidationState/g'
  git grep -l ValidationResult | xargs sed -i 's/BlockValidationResult\|TxValidationResult/ValidationInvalidReason/g'
  git grep -l MaybePunish | xargs sed -i 's/MaybePunishNode\(ForBlock\|ForTx\)/MaybePunishNode/g'
  git diff HEAD^
  ```

  After that it's possible to easily see the mechanical changes with:

  ```sh
  git log -p -n1 -U0 --word-diff-regex=. <CommitHash>
  ```

ACKs for top commit:
  laanwj:
    ACK 3004d5a12d
  amitiuttarwar:
    code review ACK 3004d5a12d. Also built & ran tests locally.
  fjahr:
    Code review ACK 3004d5a12d . Only nit style change and pure virtual destructor added since my last review.
  ryanofsky:
    Code review ACK 3004d5a12d. Just whitespace change and pure virtual destructor added since last review.

Tree-SHA512: 511de1fb380a18bec1944ea82b513b6192df632ee08bb16344a2df3c40811a88f3872f04df24bc93a41643c96c48f376a04551840fd804a961490d6c702c3d36
2019-10-30 15:37:34 +01:00
..
data Add deserialize + CheckBlock benchmarks, and a full block hex 2016-11-09 11:27:59 -08:00
.gitignore Ignore bench_bitcoin binary. 2015-10-06 17:46:12 +02:00
base58.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
bech32.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
bench.cpp [refactor] interfaces: Add missing LockAnnotation for cs_main 2019-05-13 14:46:01 -04:00
bench.h Remove unused includes 2019-10-15 22:56:43 +00:00
bench_bitcoin.cpp Merge #17279: refactor: Remove redundant c_str() calls in formatting 2019-10-28 15:10:06 -04:00
block_assemble.cpp [validation] Remove fMissingInputs from AcceptToMemoryPool() 2019-10-29 15:46:45 -04:00
ccoins_caching.cpp Move various SigningProviders to signingprovider.{cpp,h} 2019-07-09 16:20:18 -04:00
chacha20.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
chacha_poly_aead.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
checkblock.cpp [validation] Add CValidationState subclasses 2019-10-29 15:46:45 -04:00
checkqueue.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
coin_selection.cpp Pass NodeContext, ConnMan, BanMan references more places 2019-10-28 10:30:51 -04:00
crypto_hash.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
data.cpp bench: Move generated data to a dedicated translation unit 2019-07-02 18:11:15 +01:00
data.h bench: Move generated data to a dedicated translation unit 2019-07-02 18:11:15 +01:00
duplicate_inputs.cpp [validation] Add CValidationState subclasses 2019-10-29 15:46:45 -04:00
examples.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
gcs_filter.cpp blockfilter: Refactor GCS params into struct. 2018-11-06 09:12:54 -08:00
lockedpool.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
mempool_eviction.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
merkle_root.cpp Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
poly1305.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
prevector.cpp Drop defunct IS_TRIVIALLY_CONSTRUCTIBLE handling from prevector.h 2018-11-14 12:19:04 -05:00
rollingbloom.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
rpc_blockchain.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
rpc_mempool.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
util_time.cpp util: Add type safe GetTime 2019-05-23 14:12:32 -04:00
verify_script.cpp refactor: test/bench: dedup Build{Crediting,Spending}Transaction() 2019-10-23 01:59:32 +02:00
wallet_balance.cpp Pass NodeContext, ConnMan, BanMan references more places 2019-10-28 10:30:51 -04:00