aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2020-11-04 23:06:25 +0000
committerpracticalswift <practicalswift@users.noreply.github.com>2020-11-04 23:11:50 +0000
commitd7901ab8d2fdd2f6e68c4fa48078111bf5f0fa73 (patch)
treecf4e4182babe7df6d488eb4fc939be873819110b /src
parent88776c2926061482ab551b0cf5c408fc1bc39ac3 (diff)
fuzz: Assert expected DecodeHexTx behaviour when using legacy decoding
Diffstat (limited to 'src')
-rw-r--r--src/test/fuzz/decode_tx.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/fuzz/decode_tx.cpp b/src/test/fuzz/decode_tx.cpp
index a29686cbdd..a2b18c0365 100644
--- a/src/test/fuzz/decode_tx.cpp
+++ b/src/test/fuzz/decode_tx.cpp
@@ -19,12 +19,14 @@ void test_one_input(const std::vector<uint8_t>& buffer)
const bool result_none = DecodeHexTx(mtx, tx_hex, false, false);
const bool result_try_witness = DecodeHexTx(mtx, tx_hex, false, true);
const bool result_try_witness_and_maybe_no_witness = DecodeHexTx(mtx, tx_hex, true, true);
- const bool result_try_no_witness = DecodeHexTx(mtx, tx_hex, true, false);
+ CMutableTransaction no_witness_mtx;
+ const bool result_try_no_witness = DecodeHexTx(no_witness_mtx, tx_hex, true, false);
assert(!result_none);
if (result_try_witness_and_maybe_no_witness) {
assert(result_try_no_witness || result_try_witness);
}
if (result_try_no_witness) {
+ assert(!no_witness_mtx.HasWitness());
assert(result_try_witness_and_maybe_no_witness);
}
}