Bitcoin Core  0.20.99
P2P Digital Currency
settings.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2019 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 class CFeeRate;
12 class CTransaction;
13 
14 // Policy settings which are configurable at runtime.
16 extern CFeeRate dustRelayFee;
17 extern unsigned int nBytesPerSigOp;
18 extern bool fIsBareMultisigStd;
19 
20 static inline bool IsStandardTx(const CTransaction& tx, std::string& reason)
21 {
22  return IsStandardTx(tx, ::fIsBareMultisigStd, ::dustRelayFee, reason);
23 }
24 
25 static inline int64_t GetVirtualTransactionSize(int64_t weight, int64_t sigop_cost)
26 {
27  return GetVirtualTransactionSize(weight, sigop_cost, ::nBytesPerSigOp);
28 }
29 
30 static inline int64_t GetVirtualTransactionSize(const CTransaction& tx, int64_t sigop_cost)
31 {
32  return GetVirtualTransactionSize(tx, sigop_cost, ::nBytesPerSigOp);
33 }
34 
35 #endif // BITCOIN_POLICY_SETTINGS_H
CFeeRate incrementalRelayFee
Definition: settings.cpp:12
unsigned int nBytesPerSigOp
Definition: settings.cpp:14
bool fIsBareMultisigStd
Definition: settings.cpp:11
static bool IsStandardTx(const CTransaction &tx, std::string &reason)
Definition: settings.h:20
static int64_t GetVirtualTransactionSize(int64_t weight, int64_t sigop_cost)
Definition: settings.h:25
CFeeRate dustRelayFee
Definition: settings.cpp:13
Fee rate in satoshis per kilobyte: CAmount / kB.
Definition: feerate.h:29
The basic transaction that is broadcasted on the network and contained in blocks. ...
Definition: transaction.h:259