Skip to content

Commit 2d09fdb

Browse files
instagibbsajtowns
authored andcommitted
Pseudo-EA cleanups h/t kallewoof
1 parent 56482d9 commit 2d09fdb

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

Diff for: src/policy/policy.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs,
325325
return true;
326326
}
327327

328-
size_t HasEphemeralAnchor(const CTransaction& tx)
328+
size_t HasPayToAnchor(const CTransaction& tx)
329329
{
330330
for (const CTxOut& txout : tx.vout) {
331331
if (txout.scriptPubKey.IsPayToAnchor()) {

Diff for: src/policy/policy.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs,
143143
/**
144144
* Check if given transaction has a IsPayToAnchor output.
145145
**/
146-
size_t HasEphemeralAnchor(const CTransaction& tx);
146+
size_t HasPayToAnchor(const CTransaction& tx);
147147

148148
/** Compute the virtual transaction size (weight reinterpreted as bytes). */
149149
int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost, unsigned int bytes_per_sigop);

Diff for: src/script/standard.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ std::string GetTxnOutputType(TxoutType t)
5252
case TxoutType::SCRIPTHASH: return "scripthash";
5353
case TxoutType::MULTISIG: return "multisig";
5454
case TxoutType::NULL_DATA: return "nulldata";
55-
case TxoutType::ANCHOR: return "true";
55+
case TxoutType::ANCHOR: return "anchor";
5656
case TxoutType::WITNESS_V0_KEYHASH: return "witness_v0_keyhash";
5757
case TxoutType::WITNESS_V0_SCRIPTHASH: return "witness_v0_scripthash";
5858
case TxoutType::WITNESS_V1_TAPROOT: return "witness_v1_taproot";

Diff for: src/validation.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
809809
}
810810

811811
// We check for 0-base-fee transaction here now that we have access to ws.m_base_fees.
812-
if (HasEphemeralAnchor(tx) && ws.m_base_fees != 0) {
812+
if (HasPayToAnchor(tx) && ws.m_base_fees != 0) {
813813
return state.Invalid(TxValidationResult::TX_NOT_STANDARD, "invalid-ephemeral-fee");
814814
}
815815

Diff for: test/functional/feature_segwit.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ def run_test(self):
461461
p2wshop2 = script_to_p2wsh_script(op2)
462462
unsolvable_after_importaddress.append(unsolvablep2pkh)
463463
unsolvable_after_importaddress.append(unsolvablep2wshp2pkh)
464-
unsolvable_after_importaddress.append(op2) # OP_1 will be imported as script
464+
unsolvable_after_importaddress.append(op2) # OP_2 will be imported as script
465465
unsolvable_after_importaddress.append(p2wshop2)
466466
unseen_anytime.append(op0) # OP_0 will be imported as P2SH address with no script provided
467467
unsolvable_after_importaddress.append(p2shop0)

Diff for: test/functional/mempool_ephemeral_anchor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2022 The Bitcoin Core developers
2+
# Copyright (c) 2023 The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

Diff for: test/functional/rpc_psbt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ def test_psbt_input_keys(psbt_input, keys):
967967
funded_decoded = self.nodes[0].decodepsbt(funded_anchor["psbt"])["tx"]
968968
anchor_idx = 0 if funded_decoded["vout"][0]["scriptPubKey"]["hex"] == "51" else 1
969969
assert_equal(funded_decoded["vout"][anchor_idx]["scriptPubKey"]["hex"], "51")
970-
assert_equal(funded_decoded["vout"][anchor_idx]["scriptPubKey"]["type"], "true")
970+
assert_equal(funded_decoded["vout"][anchor_idx]["scriptPubKey"]["type"], "anchor")
971971
assert_equal(funded_decoded["vout"][anchor_idx]["value"], Decimal("0.00000001"))
972972

973973
anchor_tx = self.nodes[0].finalizepsbt(self.nodes[0].walletprocesspsbt(psbt=funded_anchor["psbt"])["psbt"])["hex"]

Diff for: test/functional/test_framework/wallet.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class MiniWalletMode(Enum):
7373
mode | description | address | standard | scriptSig | signing
7474
----------------+-------------------+-----------+----------+------------+----------
7575
ADDRESS_OP_TRUE | anyone-can-spend | bech32m | yes | no | no
76-
RAW_OP_2 | anyone-can-spend | - (raw) | no | yes | no
76+
RAW_OP_2 | anyone-can-spend | - (raw) | no | yes | no
7777
RAW_P2PK | pay-to-public-key | - (raw) | yes | yes | yes
7878
"""
7979
ADDRESS_OP_TRUE = 1

0 commit comments

Comments
 (0)