diff options
Diffstat (limited to 'src/policy/settings.h')
-rw-r--r-- | src/policy/settings.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/policy/settings.h b/src/policy/settings.h index 1d2a1fb880..30a7189c93 100644 --- a/src/policy/settings.h +++ b/src/policy/settings.h @@ -6,7 +6,10 @@ #ifndef BITCOIN_POLICY_SETTINGS_H #define BITCOIN_POLICY_SETTINGS_H +#include <policy/policy.h> + class CFeeRate; +class CTransaction; // Policy settings which are configurable at runtime. extern CFeeRate incrementalRelayFee; @@ -14,4 +17,19 @@ extern CFeeRate dustRelayFee; extern unsigned int nBytesPerSigOp; extern bool fIsBareMultisigStd; +static inline bool IsStandardTx(const CTransaction& tx, std::string& reason) +{ + return IsStandardTx(tx, ::fIsBareMultisigStd, ::dustRelayFee, reason); +} + +static inline int64_t GetVirtualTransactionSize(int64_t weight, int64_t sigop_cost) +{ + return GetVirtualTransactionSize(weight, sigop_cost, ::nBytesPerSigOp); +} + +static inline int64_t GetVirtualTransactionSize(const CTransaction& tx, int64_t sigop_cost) +{ + return GetVirtualTransactionSize(tx, sigop_cost, ::nBytesPerSigOp); +} + #endif // BITCOIN_POLICY_SETTINGS_H |