Skip to content

Commit ba5dd96

Browse files
committed
Merge bitcoin/bitcoin#30254: test: doc: fix units in tx-size standardness test (s/vbytes/weight units)
d1581c6 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 4537ba5), where the wrong units has been used in the comments for the large tx composition. ACKs for top commit: tdb3: ACK d1581c6 ismaelsadeeq: ACK d1581c6 glozow: ACK d1581c6 Tree-SHA512: ea2de42174f9dca0608275ea377c852ebddc5a04a2b32248ce808aea33d7e00cdee3a225b24c0cf426c69646cccbbc31273c62f7bc1647bb3443a61de3b15670
2 parents b1ba1b1 + d1581c6 commit ba5dd96

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/test/transaction_tests.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -904,15 +904,15 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
904904
t.vin.clear();
905905
t.vin.resize(2438); // size per input (empty scriptSig): 41 bytes
906906
t.vout[0].scriptPubKey = CScript() << OP_RETURN << std::vector<unsigned char>(19, 0); // output size: 30 bytes
907-
// tx header: 12 bytes => 48 vbytes
908-
// 2438 inputs: 2438*41 = 99958 bytes => 399832 vbytes
909-
// 1 output: 30 bytes => 120 vbytes
910-
// ===============================
911-
// total: 400000 vbytes
907+
// tx header: 12 bytes => 48 weight units
908+
// 2438 inputs: 2438*41 = 99958 bytes => 399832 weight units
909+
// 1 output: 30 bytes => 120 weight units
910+
// ======================================
911+
// total: 400000 weight units
912912
BOOST_CHECK_EQUAL(GetTransactionWeight(CTransaction(t)), 400000);
913913
CheckIsStandard(t);
914914

915-
// increase output size by one byte, so we end up with 400004 vbytes
915+
// increase output size by one byte, so we end up with 400004 weight units
916916
t.vout[0].scriptPubKey = CScript() << OP_RETURN << std::vector<unsigned char>(20, 0); // output size: 31 bytes
917917
BOOST_CHECK_EQUAL(GetTransactionWeight(CTransaction(t)), 400004);
918918
CheckIsNotStandard(t, "tx-size");

0 commit comments

Comments
 (0)