2019-04-02 14:14:58 -04:00
|
|
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
2019-12-30 22:39:22 +13:00
|
|
|
// Copyright (c) 2009-2019 The Bitcoin Core developers
|
2019-04-02 14:14:58 -04:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
|
|
|
#ifndef BITCOIN_POLICY_SETTINGS_H
|
|
|
|
#define BITCOIN_POLICY_SETTINGS_H
|
|
|
|
|
2022-05-31 13:30:23 +02:00
|
|
|
#include <policy/feerate.h>
|
2019-03-22 00:42:17 -04:00
|
|
|
#include <policy/policy.h>
|
|
|
|
|
2022-05-31 13:30:23 +02:00
|
|
|
#include <cstdint>
|
|
|
|
#include <string>
|
|
|
|
|
2019-03-22 00:42:17 -04:00
|
|
|
class CTransaction;
|
2019-04-02 14:14:58 -04:00
|
|
|
|
|
|
|
extern CFeeRate dustRelayFee;
|
|
|
|
extern unsigned int nBytesPerSigOp;
|
|
|
|
extern bool fIsBareMultisigStd;
|
|
|
|
|
2019-03-22 00:42:17 -04:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2019-04-02 14:14:58 -04:00
|
|
|
#endif // BITCOIN_POLICY_SETTINGS_H
|