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/block.cpp | |
parent | 5e3557b8e36308a27dbeb528569abe638c4d01dd (diff) |
Rename "block cost" to "block weight"
Diffstat (limited to 'src/primitives/block.cpp')
-rw-r--r-- | src/primitives/block.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/primitives/block.cpp b/src/primitives/block.cpp index df900388f2..0e6ab4dd71 100644 --- a/src/primitives/block.cpp +++ b/src/primitives/block.cpp @@ -32,11 +32,11 @@ std::string CBlock::ToString() const return s.str(); } -int64_t GetBlockCost(const CBlock& block) +int64_t GetBlockWeight(const CBlock& block) { - // This implements the cost = (stripped_size * 4) + witness_size formula, + // This implements the weight = (stripped_size * 4) + witness_size formula, // using only serialization with and without witness data. As witness_size // is equal to total_size - stripped_size, this formula is identical to: - // cost = (stripped_size * 3) + total_size. + // weight = (stripped_size * 3) + total_size. return ::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION); } |