aboutsummaryrefslogtreecommitdiff
path: root/src/policy
diff options
context:
space:
mode:
Diffstat (limited to 'src/policy')
-rw-r--r--src/policy/fees.h2
-rw-r--r--src/policy/policy.cpp4
-rw-r--r--src/policy/rbf.cpp8
-rw-r--r--src/policy/rbf.h8
4 files changed, 11 insertions, 11 deletions
diff --git a/src/policy/fees.h b/src/policy/fees.h
index 5f69e989c1..7f80fc92c2 100644
--- a/src/policy/fees.h
+++ b/src/policy/fees.h
@@ -68,7 +68,7 @@ class TxConfirmStats;
/* Identifier for each of the 3 different TxConfirmStats which will track
* history over different time horizons. */
-enum FeeEstimateHorizon {
+enum class FeeEstimateHorizon {
SHORT_HALFLIFE = 0,
MED_HALFLIFE = 1,
LONG_HALFLIFE = 2
diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp
index db1ad4f26d..c3f65fb2ab 100644
--- a/src/policy/policy.cpp
+++ b/src/policy/policy.cpp
@@ -179,7 +179,7 @@ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
{
std::vector<std::vector<unsigned char> > stack;
// convert the scriptSig into a stack, so we can inspect the redeemScript
- if (!EvalScript(stack, tx.vin[i].scriptSig, SCRIPT_VERIFY_NONE, BaseSignatureChecker(), SIGVERSION_BASE))
+ if (!EvalScript(stack, tx.vin[i].scriptSig, SCRIPT_VERIFY_NONE, BaseSignatureChecker(), SigVersion::BASE))
return false;
if (stack.empty())
return false;
@@ -215,7 +215,7 @@ bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
// If the scriptPubKey is P2SH, we try to extract the redeemScript casually by converting the scriptSig
// into a stack. We do not check IsPushOnly nor compare the hash as these will be done later anyway.
// If the check fails at this stage, we know that this txid must be a bad one.
- if (!EvalScript(stack, tx.vin[i].scriptSig, SCRIPT_VERIFY_NONE, BaseSignatureChecker(), SIGVERSION_BASE))
+ if (!EvalScript(stack, tx.vin[i].scriptSig, SCRIPT_VERIFY_NONE, BaseSignatureChecker(), SigVersion::BASE))
return false;
if (stack.empty())
return false;
diff --git a/src/policy/rbf.cpp b/src/policy/rbf.cpp
index c5a1741608..81b2a7fadc 100644
--- a/src/policy/rbf.cpp
+++ b/src/policy/rbf.cpp
@@ -22,13 +22,13 @@ RBFTransactionState IsRBFOptIn(const CTransaction &tx, CTxMemPool &pool)
// First check the transaction itself.
if (SignalsOptInRBF(tx)) {
- return RBF_TRANSACTIONSTATE_REPLACEABLE_BIP125;
+ return RBFTransactionState::REPLACEABLE_BIP125;
}
// If this transaction is not in our mempool, then we can't be sure
// we will know about all its inputs.
if (!pool.exists(tx.GetHash())) {
- return RBF_TRANSACTIONSTATE_UNKNOWN;
+ return RBFTransactionState::UNKNOWN;
}
// If all the inputs have nSequence >= maxint-1, it still might be
@@ -40,8 +40,8 @@ RBFTransactionState IsRBFOptIn(const CTransaction &tx, CTxMemPool &pool)
for (CTxMemPool::txiter it : setAncestors) {
if (SignalsOptInRBF(it->GetTx())) {
- return RBF_TRANSACTIONSTATE_REPLACEABLE_BIP125;
+ return RBFTransactionState::REPLACEABLE_BIP125;
}
}
- return RBF_TRANSACTIONSTATE_FINAL;
+ return RBFTransactionState::FINAL;
}
diff --git a/src/policy/rbf.h b/src/policy/rbf.h
index 72f51b0f03..b10532addf 100644
--- a/src/policy/rbf.h
+++ b/src/policy/rbf.h
@@ -9,10 +9,10 @@
static const uint32_t MAX_BIP125_RBF_SEQUENCE = 0xfffffffd;
-enum RBFTransactionState {
- RBF_TRANSACTIONSTATE_UNKNOWN,
- RBF_TRANSACTIONSTATE_REPLACEABLE_BIP125,
- RBF_TRANSACTIONSTATE_FINAL
+enum class RBFTransactionState {
+ UNKNOWN,
+ REPLACEABLE_BIP125,
+ FINAL
};
// Check whether the sequence numbers on this transaction are signaling