aboutsummaryrefslogtreecommitdiff
path: root/src/policy/policy.cpp
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@chaincode.com>2016-07-18 13:28:26 -0400
committerSuhas Daftuar <sdaftuar@chaincode.com>2016-07-18 13:28:26 -0400
commit2c06bae39edfaa9c0855d83377ad8fda09e4fa08 (patch)
tree931520ad5742b9a758a4bd9143fdfe96f180ab79 /src/policy/policy.cpp
parent5e3557b8e36308a27dbeb528569abe638c4d01dd (diff)
downloadbitcoin-2c06bae39edfaa9c0855d83377ad8fda09e4fa08.tar.xz
Rename "block cost" to "block weight"
Diffstat (limited to 'src/policy/policy.cpp')
-rw-r--r--src/policy/policy.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp
index f2148bfe10..8617db00c8 100644
--- a/src/policy/policy.cpp
+++ b/src/policy/policy.cpp
@@ -64,8 +64,8 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason)
// almost as much to process as they cost the sender in fees, because
// computing signature hashes is O(ninputs*txsize). Limiting transactions
// to MAX_STANDARD_TX_SIZE mitigates CPU exhaustion attacks.
- unsigned int sz = GetTransactionCost(tx);
- if (sz >= MAX_STANDARD_TX_COST) {
+ unsigned int sz = GetTransactionWeight(tx);
+ if (sz >= MAX_STANDARD_TX_WEIGHT) {
reason = "tx-size";
return false;
}
@@ -151,12 +151,12 @@ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
return true;
}
-int64_t GetVirtualTransactionSize(int64_t nCost)
+int64_t GetVirtualTransactionSize(int64_t nWeight)
{
- return (nCost + WITNESS_SCALE_FACTOR - 1) / WITNESS_SCALE_FACTOR;
+ return (nWeight + WITNESS_SCALE_FACTOR - 1) / WITNESS_SCALE_FACTOR;
}
int64_t GetVirtualTransactionSize(const CTransaction& tx)
{
- return GetVirtualTransactionSize(GetTransactionCost(tx));
+ return GetVirtualTransactionSize(GetTransactionWeight(tx));
}