diff options
author | Suhas Daftuar <sdaftuar@chaincode.com> | 2016-07-18 13:28:26 -0400 |
---|---|---|
committer | Suhas Daftuar <sdaftuar@chaincode.com> | 2016-07-18 13:28:26 -0400 |
commit | 2c06bae39edfaa9c0855d83377ad8fda09e4fa08 (patch) | |
tree | 931520ad5742b9a758a4bd9143fdfe96f180ab79 /src/primitives/transaction.cpp | |
parent | 5e3557b8e36308a27dbeb528569abe638c4d01dd (diff) |
Rename "block cost" to "block weight"
Diffstat (limited to 'src/primitives/transaction.cpp')
-rw-r--r-- | src/primitives/transaction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp index 7f10409c05..8d63805643 100644 --- a/src/primitives/transaction.cpp +++ b/src/primitives/transaction.cpp @@ -121,7 +121,7 @@ unsigned int CTransaction::CalculateModifiedSize(unsigned int nTxSize) const // Providing any more cleanup incentive than making additional inputs free would // risk encouraging people to create junk outputs to redeem later. if (nTxSize == 0) - nTxSize = (GetTransactionCost(*this) + WITNESS_SCALE_FACTOR - 1) / WITNESS_SCALE_FACTOR; + nTxSize = (GetTransactionWeight(*this) + WITNESS_SCALE_FACTOR - 1) / WITNESS_SCALE_FACTOR; for (std::vector<CTxIn>::const_iterator it(vin.begin()); it != vin.end(); ++it) { unsigned int offset = 41U + std::min(110U, (unsigned int)it->scriptSig.size()); @@ -149,7 +149,7 @@ std::string CTransaction::ToString() const return str; } -int64_t GetTransactionCost(const CTransaction& tx) +int64_t GetTransactionWeight(const CTransaction& tx) { return ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) * (WITNESS_SCALE_FACTOR -1) + ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); } |