aboutsummaryrefslogtreecommitdiff
path: root/src/policy/policy.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-05-30 09:16:05 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-06-21 06:41:55 -0400
commitfa32adf9dc25540ad27f5b82654c7057d7738627 (patch)
tree088637f80e9b393d505c6404b2c76dc28e884c62 /src/policy/policy.h
parentfa95a694c492b267e4038674fd3f338dd215ab48 (diff)
downloadbitcoin-fa32adf9dc25540ad27f5b82654c7057d7738627.tar.xz
scripted-diff: TxoutType C++11 scoped enum class
-BEGIN VERIFY SCRIPT- # General rename helper: $1 -> $2 rename_global() { sed -i "s/\<$1\>/$2/g" $(git grep -l "$1"); } # Helper to rename TxoutType $1 rename_value() { sed -i "s/ TX_$1,/ $1,/g" src/script/standard.h; # First strip the prefix in the definition (header) rename_global TX_$1 "TxoutType::$1"; # Then replace globally } # Change the type globally to bring it in line with the style-guide # (clsses are UpperCamelCase) rename_global 'enum txnouttype' 'enum class TxoutType' rename_global 'txnouttype' 'TxoutType' # Now rename each enum value rename_value 'NONSTANDARD' rename_value 'PUBKEY' rename_value 'PUBKEYHASH' rename_value 'SCRIPTHASH' rename_value 'MULTISIG' rename_value 'NULL_DATA' rename_value 'WITNESS_V0_KEYHASH' rename_value 'WITNESS_V0_SCRIPTHASH' rename_value 'WITNESS_UNKNOWN' -END VERIFY SCRIPT-
Diffstat (limited to 'src/policy/policy.h')
-rw-r--r--src/policy/policy.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/policy/policy.h b/src/policy/policy.h
index 1561a41c5e..7f168ee20f 100644
--- a/src/policy/policy.h
+++ b/src/policy/policy.h
@@ -81,7 +81,7 @@ CAmount GetDustThreshold(const CTxOut& txout, const CFeeRate& dustRelayFee);
bool IsDust(const CTxOut& txout, const CFeeRate& dustRelayFee);
-bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType);
+bool IsStandard(const CScript& scriptPubKey, TxoutType& whichType);
/**
* Check for standard transaction types
* @return True if all outputs (scriptPubKeys) use only standard transaction forms