v29.4-roots.3 · Commit 7: [PATCH 07/30] release: establish Roots maintenance and assurance
src/test/fuzz/transaction.cpp
Before: src/test/fuzz/transaction.cpp · After: src/test/fuzz/transaction.cpp
File metadata
index c9eb11222fe583973e0b7ccd7770a2470f5c635d..3d01c74dae05c4c642315495f334a13e6b656001 100644
Download original patch · Release notes
Diff rows 1–25 of 25. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
src/test/fuzz/transaction.cpp
CHANGED
|
@@ -59,10 +59,13 @@ FUZZ_TARGET(transaction, .init = initialize_transaction)
|
|
| 59 |
Assert(res == state_with_dupe_check.IsValid());
|
| 60 |
}
|
| 61 |
|
| 62 |
-
const CFeeRate dust_relay_fee{DUST_RELAY_TX_FEE};
|
| 63 |
std::string reason;
|
| 64 |
-
const bool is_standard_with_permit_bare_multisig = IsStandardTx(tx, std::nullopt, /* permit_bare_multisig= */ true, dust_relay_fee, reason);
|
| 65 |
-
const bool is_standard_without_permit_bare_multisig = IsStandardTx(tx, std::nullopt, /* permit_bare_multisig= */ false, dust_relay_fee, reason);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
if (is_standard_without_permit_bare_multisig) {
|
| 67 |
assert(is_standard_with_permit_bare_multisig);
|
| 68 |
}
|
|
@@ -90,7 +93,8 @@ FUZZ_TARGET(transaction, .init = initialize_transaction)
|
|
| 90 |
CCoinsView coins_view;
|
| 91 |
const CCoinsViewCache coins_view_cache(&coins_view);
|
| 92 |
(void)AreInputsStandard(tx, coins_view_cache);
|
| 93 |
-
(void)IsWitnessStandard(tx, coins_view_cache);
|
|
|
|
| 94 |
|
| 95 |
if (tx.GetTotalSize() < 250'000) { // Avoid high memory usage (with msan) due to json encoding
|
| 96 |
{
|
|
|
|
| 59 |
Assert(res == state_with_dupe_check.IsValid());
|
| 60 |
}
|
| 61 |
|
|
|
|
| 62 |
std::string reason;
|
| 63 |
+
StandardnessOptions standardness_opts;
|
| 64 |
+
standardness_opts.permit_bare_pubkey = true;
|
| 65 |
+
standardness_opts.permit_bare_multisig = true;
|
| 66 |
+
const bool is_standard_with_permit_bare_multisig = IsStandardTx(tx, standardness_opts, reason);
|
| 67 |
+
standardness_opts.permit_bare_multisig = false;
|
| 68 |
+
const bool is_standard_without_permit_bare_multisig = IsStandardTx(tx, standardness_opts, reason);
|
| 69 |
if (is_standard_without_permit_bare_multisig) {
|
| 70 |
assert(is_standard_with_permit_bare_multisig);
|
| 71 |
}
|
|
|
|
| 93 |
CCoinsView coins_view;
|
| 94 |
const CCoinsViewCache coins_view_cache(&coins_view);
|
| 95 |
(void)AreInputsStandard(tx, coins_view_cache);
|
| 96 |
+
std::string reject_reason;
|
| 97 |
+
(void)IsWitnessStandard(tx, coins_view_cache, "fuzz", reject_reason);
|
| 98 |
|
| 99 |
if (tx.GetTotalSize() < 250'000) { // Avoid high memory usage (with msan) due to json encoding
|
| 100 |
{
|