Merge #20290: fuzz: Fix DecodeHexTx fuzzing harness issue

28f8cb13d4 fuzz: Fix DecodeHexTx fuzzing harness issue (practicalswift)

Pull request description:

  Fix `DecodeHexTx` fuzzing harness issue.

  Before this patch:

  ```
  $ src/test/fuzz/decode_tx
  decode_tx: test/fuzz/decode_tx.cpp:29:
      void test_one_input(const std::vector<uint8_t> &):
      Assertion `result_try_witness_and_maybe_no_witness' failed.
  …
  ```

  After this patch:

  ```
  $ src/test/fuzz/decode_tx
  …
  ```

ACKs for top commit:
  MarcoFalke:
    review ACK 28f8cb13d4

Tree-SHA512: 2ed11b2f00a4c6fa3e8eea76a2a37d89a4b8d52815264676fe3de0a26ad7906cfafda9b843ceede2fd428815472e01fd1f87afb851282a8c7839bd4c87dc382b
This commit is contained in:
MarcoFalke 2020-11-03 09:48:12 +01:00
commit 218fe60d91
No known key found for this signature in database
GPG key ID: D2EA4850E7528B25

View file

@ -24,8 +24,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
if (result_try_witness_and_maybe_no_witness) {
assert(result_try_no_witness || result_try_witness);
}
// if (result_try_no_witness) { // Uncomment when https://github.com/bitcoin/bitcoin/pull/17775 is merged
if (result_try_witness) { // Remove stop-gap when https://github.com/bitcoin/bitcoin/pull/17775 is merged
if (result_try_no_witness) {
assert(result_try_witness_and_maybe_no_witness);
}
}