v31.1-roots.1 · Commit 2: [PATCH 02/17] feat(policy): preserve Roots parsing and local transaction checks
src/test/script_p2sh_tests.cpp
Before: src/test/script_p2sh_tests.cpp · After: src/test/script_p2sh_tests.cpp
File metadata
index 2f93d0a8c38e57f5469af9f9afa3113c5a07c690..70e369ba7865d96358700f0555632af398f3a4f7 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/script_p2sh_tests.cpp
CHANGED
|
@@ -21,13 +21,22 @@
|
|
| 21 |
// Helpers:
|
| 22 |
static bool IsStandardTx(const CTransaction& tx, bool permit_bare_multisig, std::string& reason)
|
| 23 |
{
|
| 24 |
-
return IsStandardTx(tx, std::nullopt, permit_bare_multisig, CFeeRate{DUST_RELAY_TX_FEE}, reason);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
}
|
| 26 |
|
| 27 |
static bool IsStandardTx(const CTransaction& tx, std::string& reason)
|
| 28 |
{
|
| 29 |
-
return IsStandardTx(tx, std::nullopt, /*permit_bare_multisig=*/true, CFeeRate{DUST_RELAY_TX_FEE}, reason) &&
|
| 30 |
-
IsStandardTx(tx, std::nullopt, /*permit_bare_multisig=*/false, CFeeRate{DUST_RELAY_TX_FEE}, reason);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
}
|
| 32 |
|
| 33 |
static std::vector<unsigned char> Serialize(const CScript& s)
|
|
|
|
| 21 |
// Helpers:
|
| 22 |
static bool IsStandardTx(const CTransaction& tx, bool permit_bare_multisig, std::string& reason)
|
| 23 |
{
|
| 24 |
+
const StandardnessOptions opts{
|
| 25 |
+
.permit_bare_pubkey = true,
|
| 26 |
+
.permit_bare_multisig = permit_bare_multisig,
|
| 27 |
+
};
|
| 28 |
+
return IsStandardTx(tx, opts, reason);
|
| 29 |
}
|
| 30 |
|
| 31 |
static bool IsStandardTx(const CTransaction& tx, std::string& reason)
|
| 32 |
{
|
| 33 |
+
StandardnessOptions opts{
|
| 34 |
+
.permit_bare_pubkey = true,
|
| 35 |
+
.permit_bare_multisig = true,
|
| 36 |
+
};
|
| 37 |
+
if (!IsStandardTx(tx, opts, reason)) return false;
|
| 38 |
+
opts.permit_bare_multisig = false;
|
| 39 |
+
return IsStandardTx(tx, opts, reason);
|
| 40 |
}
|
| 41 |
|
| 42 |
static std::vector<unsigned char> Serialize(const CScript& s)
|