Skip to content

Commit 07ede5d

Browse files
committed
update comments for tx weight
1 parent 87ab49e commit 07ede5d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/policy/policy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnes
6666
// Extremely large transactions with lots of inputs can cost the network
6767
// almost as much to process as they cost the sender in fees, because
6868
// computing signature hashes is O(ninputs*txsize). Limiting transactions
69-
// to MAX_STANDARD_TX_SIZE mitigates CPU exhaustion attacks.
69+
// to MAX_STANDARD_TX_WEIGHT mitigates CPU exhaustion attacks.
7070
unsigned int sz = GetTransactionWeight(tx);
7171
if (sz >= MAX_STANDARD_TX_WEIGHT) {
7272
reason = "tx-size";

src/wallet/test/wallet_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
266266
// test with many inputs
267267
for (CAmount amt=1500; amt < COIN; amt*=10) {
268268
empty_wallet();
269-
// Create 676 inputs (= MAX_STANDARD_TX_SIZE / 148 bytes per input)
269+
// Create 676 inputs (= (old MAX_STANDARD_TX_SIZE == 100000) / 148 bytes per input)
270270
for (uint16_t j = 0; j < 676; j++)
271271
add_coin(amt);
272272
BOOST_CHECK(wallet.SelectCoinsMinConf(2000, 1, 1, vCoins, setCoinsRet, nValueRet));

0 commit comments

Comments
 (0)