6 #ifndef BITCOIN_POLICY_POLICY_H 7 #define BITCOIN_POLICY_POLICY_H 20 static const unsigned int DEFAULT_BLOCK_MAX_WEIGHT = MAX_BLOCK_WEIGHT - 4000;
22 static const unsigned int DEFAULT_BLOCK_MIN_TX_FEE = 1000;
24 static const unsigned int MAX_STANDARD_TX_WEIGHT = 400000;
26 static const unsigned int MIN_STANDARD_TX_NONWITNESS_SIZE = 82;
28 static const unsigned int MAX_P2SH_SIGOPS = 15;
30 static const unsigned int MAX_STANDARD_TX_SIGOPS_COST = MAX_BLOCK_SIGOPS_COST/5;
32 static const unsigned int DEFAULT_MAX_MEMPOOL_SIZE = 300;
34 static const unsigned int DEFAULT_INCREMENTAL_RELAY_FEE = 1000;
36 static const unsigned int DEFAULT_BYTES_PER_SIGOP = 20;
38 static const unsigned int MAX_STANDARD_P2WSH_STACK_ITEMS = 100;
40 static const unsigned int MAX_STANDARD_P2WSH_STACK_ITEM_SIZE = 80;
42 static const unsigned int MAX_STANDARD_P2WSH_SCRIPT_SIZE = 3600;
48 static const unsigned int DUST_RELAY_TX_FEE = 3000;
54 static constexpr
unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY_FLAGS |
72 static constexpr
unsigned int STANDARD_NOT_MANDATORY_VERIFY_FLAGS = STANDARD_SCRIPT_VERIFY_FLAGS & ~MANDATORY_SCRIPT_VERIFY_FLAGS;
75 static constexpr
unsigned int STANDARD_LOCKTIME_VERIFY_FLAGS = LOCKTIME_VERIFY_SEQUENCE |
76 LOCKTIME_MEDIAN_TIME_PAST;
110 #endif // BITCOIN_POLICY_POLICY_H
CFeeRate incrementalRelayFee
bool IsStandardTx(const CTransaction &tx, std::string &reason)
Check for standard transaction types.
CAmount GetDustThreshold(const CTxOut &txout, const CFeeRate &dustRelayFee)
bool IsDust(const CTxOut &txout, const CFeeRate &dustRelayFee)
int64_t CAmount
Amount in satoshis (Can be negative)
An input of a transaction.
int64_t GetVirtualTransactionInputSize(const CTxIn &tx, int64_t nSigOpCost=0)
An output of a transaction.
int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost)
Compute the virtual transaction size (weight reinterpreted as bytes).
Serialized script, used inside transaction inputs and outputs.
Fee rate in satoshis per kilobyte: CAmount / kB.
unsigned int nBytesPerSigOp
The basic transaction that is broadcasted on the network and contained in blocks. ...
CCoinsView that adds a memory cache for transactions to another CCoinsView.
bool IsStandard(const CScript &scriptPubKey, txnouttype &whichType)
bool AreInputsStandard(const CTransaction &tx, const CCoinsViewCache &mapInputs)
Check for standard transaction types.
bool IsWitnessStandard(const CTransaction &tx, const CCoinsViewCache &mapInputs)
Check if the transaction is over standard P2WSH resources limit: 3600bytes witnessScript size...