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. The two line-number columns refer to before and after.
src/test/script_p2sh_tests.cpp
CHANGED
|
@@ -21,13 +21,22 @@
|
|
|
21
21
|
// Helpers:
|
|
22
22
|
static bool IsStandardTx(const CTransaction& tx, bool permit_bare_multisig, std::string& reason)
|
|
23
23
|
{
|
|
24
|
-
return IsStandardTx(tx, std::nullopt, permit_bare_multisig, CFeeRate{DUST_RELAY_TX_FEE}, reason);
|
|
24
|
+
const StandardnessOptions opts{
|
|
25
|
+
.permit_bare_pubkey = true,
|
|
26
|
+
.permit_bare_multisig = permit_bare_multisig,
|
|
27
|
+
};
|
|
28
|
+
return IsStandardTx(tx, opts, reason);
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
static bool IsStandardTx(const CTransaction& tx, std::string& reason)
|
|
28
32
|
{
|
|
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);
|
|
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);
|
|
31
40
|
}
|
|
32
41
|
|
|
33
42
|
static std::vector<unsigned char> Serialize(const CScript& s)
|