aboutsummaryrefslogtreecommitdiff
path: root/src/policy/policy.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-07-18 20:57:20 +0200
committerdexX7 <dexx@bitwatch.co>2016-07-31 21:47:21 +0200
commit3f65ba2b3bd6c4e269f8f89b16d386b443431693 (patch)
tree01e5877a9482e9fc2b04378190b2bdfb3e5d89ce /src/policy/policy.h
parentced6c940da35fcf33160d1c7f2f54a99dc7eedb1 (diff)
downloadbitcoin-3f65ba2b3bd6c4e269f8f89b16d386b443431693.tar.xz
Treat high-sigop transactions as larger rather than rejecting them
Diffstat (limited to 'src/policy/policy.h')
-rw-r--r--src/policy/policy.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/policy/policy.h b/src/policy/policy.h
index ad209d0306..6bf5ca0ee5 100644
--- a/src/policy/policy.h
+++ b/src/policy/policy.h
@@ -28,6 +28,8 @@ static const unsigned int MAX_P2SH_SIGOPS = 15;
static const unsigned int MAX_STANDARD_TX_SIGOPS_COST = MAX_BLOCK_SIGOPS_COST/5;
/** Default for -maxmempool, maximum megabytes of mempool memory usage */
static const unsigned int DEFAULT_MAX_MEMPOOL_SIZE = 300;
+/** Default for -bytespersigop */
+static const unsigned int DEFAULT_BYTES_PER_SIGOP = 20;
/**
* Standard script verification flags that standard transactions will comply
* with. However scripts violating these flags may still be present in valid
@@ -66,8 +68,10 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnes
*/
bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs);
+extern unsigned int nBytesPerSigOp;
+
/** Compute the virtual transaction size (weight reinterpreted as bytes). */
-int64_t GetVirtualTransactionSize(int64_t nWeight);
-int64_t GetVirtualTransactionSize(const CTransaction& tx);
+int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost);
+int64_t GetVirtualTransactionSize(const CTransaction& tx, int64_t nSigOpCost = 0);
#endif // BITCOIN_POLICY_POLICY_H