Bitcoin ABC  0.22.13
P2P Digital Currency
settings.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2018 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef BITCOIN_POLICY_SETTINGS_H
7 #define BITCOIN_POLICY_SETTINGS_H
8 
9 #include <policy/policy.h>
10 
11 #include <cstdint>
12 
13 class CFeeRate;
14 class CTransaction;
15 
16 // Policy settings which are configurable at runtime.
17 extern CFeeRate dustRelayFee;
18 extern uint32_t nBytesPerSigOp;
19 extern bool fIsBareMultisigStd;
20 
21 static inline bool IsStandardTx(const CTransaction &tx, std::string &reason) {
22  return IsStandardTx(tx, ::fIsBareMultisigStd, ::dustRelayFee, reason);
23 }
24 
25 static inline int64_t GetVirtualTransactionSize(int64_t nSize,
26  int64_t nSigOpCount) {
27  return GetVirtualTransactionSize(nSize, nSigOpCount, ::nBytesPerSigOp);
28 }
29 
30 static inline int64_t GetVirtualTransactionSize(const CTransaction &tx,
31  int64_t sigop_cost) {
32  return GetVirtualTransactionSize(tx, sigop_cost, ::nBytesPerSigOp);
33 }
34 
35 #endif // BITCOIN_POLICY_SETTINGS_H
uint32_t nBytesPerSigOp
Definition: settings.cpp:12
static int64_t GetVirtualTransactionSize(int64_t nSize, int64_t nSigOpCount)
Definition: settings.h:25
bool fIsBareMultisigStd
Definition: settings.cpp:10
unsigned int nSigOpCount
static bool IsStandardTx(const CTransaction &tx, std::string &reason)
Definition: settings.h:21
CFeeRate dustRelayFee
Definition: settings.cpp:11
Fee rate in satoshis per kilobyte: Amount / kB.
Definition: feerate.h:21
The basic transaction that is broadcasted on the network and contained in blocks. ...
Definition: transaction.h:211