diff options
author | Suhas Daftuar <sdaftuar@chaincode.com> | 2016-07-18 13:28:26 -0400 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-07-19 12:10:28 +0200 |
commit | fca1a415cec6b7655448ce8b30778784ab4c181e (patch) | |
tree | 9509f8d07e5a811d00402fad12f021532b16f5fd /src/main.cpp | |
parent | a07c8a032c0d7c82d94a96d7c23c5d520212d7c8 (diff) | |
download | bitcoin-fca1a415cec6b7655448ce8b30778784ab4c181e.tar.xz |
Rename "block cost" to "block weight"
Github-Pull: #8363
Rebased-From: 2c06bae39edfaa9c0855d83377ad8fda09e4fa08
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp index 73fbe53afb..fe19895f5f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -694,8 +694,8 @@ bool AddOrphanTx(const CTransaction& tx, NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(c // have been mined or received. // 100 orphans, each of which is at most 99,999 bytes big is // at most 10 megabytes of orphans and somewhat more byprev index (in the worst case): - unsigned int sz = GetTransactionCost(tx); - if (sz >= MAX_STANDARD_TX_COST) + unsigned int sz = GetTransactionWeight(tx); + if (sz >= MAX_STANDARD_TX_WEIGHT) { LogPrint("mempool", "ignoring large orphan tx (size: %u, hash: %s)\n", sz, hash.ToString()); return false; @@ -3596,13 +3596,13 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIn } // After the coinbase witness nonce and commitment are verified, - // we can check if the block cost passes (before we've checked the - // coinbase witness, it would be possible for the cost to be too + // we can check if the block weight passes (before we've checked the + // coinbase witness, it would be possible for the weight to be too // large by filling up the coinbase witness, which doesn't change // the block hash, so we couldn't mark the block as permanently // failed). - if (GetBlockCost(block) > MAX_BLOCK_COST) { - return state.DoS(100, error("ContextualCheckBlock(): cost limit failed"), REJECT_INVALID, "bad-blk-cost"); + if (GetBlockWeight(block) > MAX_BLOCK_WEIGHT) { + return state.DoS(100, error("ContextualCheckBlock(): weight limit failed"), REJECT_INVALID, "bad-blk-weight"); } return true; |