aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglozow <gloriajzhao@gmail.com>2024-06-11 11:35:15 +0100
committerglozow <gloriajzhao@gmail.com>2024-06-11 11:42:50 +0100
commitba5dd96298559d1f078c397048ce6703b90c067c (patch)
tree3c6fc635ec732fbb17eed03692035bf19363fa97 /src
parentb1ba1b178f501daa1afdd91f9efec34e5ec1e294 (diff)
parentd1581c6048478cf70c5fb9ec5ebc178f16b376b8 (diff)
downloadbitcoin-ba5dd96298559d1f078c397048ce6703b90c067c.tar.xz
Merge bitcoin/bitcoin#30254: test: doc: fix units in tx-size standardness test (s/vbytes/weight units)
d1581c6048478cf70c5fb9ec5ebc178f16b376b8 test: doc: fix units in tx size standardness test (s/vbytes/weight units) (Sebastian Falbesoner) Pull request description: This small fixup PR is a late follow-up for #17947 (commit 4537ba5f21ad8afb705325cd8e15dd43877eb28f), where the wrong units has been used in the comments for the large tx composition. ACKs for top commit: tdb3: ACK d1581c6048478cf70c5fb9ec5ebc178f16b376b8 ismaelsadeeq: ACK d1581c6048478cf70c5fb9ec5ebc178f16b376b8 glozow: ACK d1581c6048478cf70c5fb9ec5ebc178f16b376b8 Tree-SHA512: ea2de42174f9dca0608275ea377c852ebddc5a04a2b32248ce808aea33d7e00cdee3a225b24c0cf426c69646cccbbc31273c62f7bc1647bb3443a61de3b15670
Diffstat (limited to 'src')
-rw-r--r--src/test/transaction_tests.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index e6cf64611e..21ef5dec5c 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -904,15 +904,15 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
t.vin.clear();
t.vin.resize(2438); // size per input (empty scriptSig): 41 bytes
t.vout[0].scriptPubKey = CScript() << OP_RETURN << std::vector<unsigned char>(19, 0); // output size: 30 bytes
- // tx header: 12 bytes => 48 vbytes
- // 2438 inputs: 2438*41 = 99958 bytes => 399832 vbytes
- // 1 output: 30 bytes => 120 vbytes
- // ===============================
- // total: 400000 vbytes
+ // tx header: 12 bytes => 48 weight units
+ // 2438 inputs: 2438*41 = 99958 bytes => 399832 weight units
+ // 1 output: 30 bytes => 120 weight units
+ // ======================================
+ // total: 400000 weight units
BOOST_CHECK_EQUAL(GetTransactionWeight(CTransaction(t)), 400000);
CheckIsStandard(t);
- // increase output size by one byte, so we end up with 400004 vbytes
+ // increase output size by one byte, so we end up with 400004 weight units
t.vout[0].scriptPubKey = CScript() << OP_RETURN << std::vector<unsigned char>(20, 0); // output size: 31 bytes
BOOST_CHECK_EQUAL(GetTransactionWeight(CTransaction(t)), 400004);
CheckIsNotStandard(t, "tx-size");