Changeset View
Changeset View
Standalone View
Standalone View
src/policy/policy.h
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Default for -incrementalrelayfee, which sets the minimum feerate increase for | * Default for -incrementalrelayfee, which sets the minimum feerate increase for | ||||
* mempool limiting or BIP 125 replacement. | * mempool limiting or BIP 125 replacement. | ||||
*/ | */ | ||||
static const CFeeRate MEMPOOL_FULL_FEE_INCREMENT(1000 * SATOSHI); | static const CFeeRate MEMPOOL_FULL_FEE_INCREMENT(1000 * SATOSHI); | ||||
/** | /** | ||||
* Default for -bytespersigop . | * Default for -bytespersigop . | ||||
*/ | */ | ||||
static const unsigned int DEFAULT_BYTES_PER_SIGOP = 20; | static const unsigned int DEFAULT_BYTES_PER_SIGOP = | ||||
1000000 / MAX_BLOCK_SIGOPS_PER_MB; | |||||
/** | /** | ||||
* Min feerate for defining dust. Historically this has been the same as the | * Min feerate for defining dust. Historically this has been the same as the | ||||
* minRelayTxFee, however changing the dust limit changes which transactions are | * minRelayTxFee, however changing the dust limit changes which transactions are | ||||
* standard and should be done with care and ideally rarely. It makes sense to | * standard and should be done with care and ideally rarely. It makes sense to | ||||
* only increase the dust limit after prior releases were already not creating | * only increase the dust limit after prior releases were already not creating | ||||
* outputs below the new threshold. | * outputs below the new threshold. | ||||
*/ | */ | ||||
static const Amount DUST_RELAY_TX_FEE(1000 * SATOSHI); | static const Amount DUST_RELAY_TX_FEE(1000 * SATOSHI); | ||||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
* @return True if all inputs (scriptSigs) use only standard transaction forms | * @return True if all inputs (scriptSigs) use only standard transaction forms | ||||
*/ | */ | ||||
bool AreInputsStandard(const CTransaction &tx, | bool AreInputsStandard(const CTransaction &tx, | ||||
const CCoinsViewCache &mapInputs); | const CCoinsViewCache &mapInputs); | ||||
extern CFeeRate dustRelayFee; | extern CFeeRate dustRelayFee; | ||||
extern uint32_t nBytesPerSigOp; | extern uint32_t nBytesPerSigOp; | ||||
/** Compute the virtual transaction size (weight reinterpreted as bytes). */ | /** | ||||
* Compute the virtual transaction size (size, or more if sigops are too | |||||
* dense). | |||||
*/ | |||||
int64_t GetVirtualTransactionSize(int64_t nSize, int64_t nSigOpCost, | int64_t GetVirtualTransactionSize(int64_t nSize, int64_t nSigOpCost, | ||||
unsigned int bytes_per_sigop); | unsigned int bytes_per_sigop); | ||||
int64_t GetVirtualTransactionSize(const CTransaction &tx, int64_t nSigOpCost, | int64_t GetVirtualTransactionSize(const CTransaction &tx, int64_t nSigOpCost, | ||||
unsigned int bytes_per_sigop); | unsigned int bytes_per_sigop); | ||||
int64_t GetVirtualTransactionInputSize(const CTxIn &txin, int64_t nSigOpCost, | int64_t GetVirtualTransactionInputSize(const CTxIn &txin, int64_t nSigOpCost, | ||||
unsigned int bytes_per_sigop); | unsigned int bytes_per_sigop); | ||||
static inline int64_t GetVirtualTransactionSize(int64_t nSize, | |||||
int64_t nSigOpCost) { | |||||
return GetVirtualTransactionSize(nSize, nSigOpCost, ::nBytesPerSigOp); | |||||
} | |||||
#endif // BITCOIN_POLICY_POLICY_H | #endif // BITCOIN_POLICY_POLICY_H |