diff options
author | Ava Chow <github@achow101.com> | 2024-06-20 13:36:55 -0400 |
---|---|---|
committer | Ava Chow <github@achow101.com> | 2024-06-20 13:36:55 -0400 |
commit | 21656e99b5f489c881f9fe90b28edc4aac870ab0 (patch) | |
tree | 0018d6d97ec952b3cc88397e3ea7775e3fbd082d /src/wallet/spend.cpp | |
parent | a52837b9e9692e7e1e8f3a5fd510aca8ef8a5ac4 (diff) | |
parent | 969e047cfbab86e5819a2c9056e8d2dab17513a8 (diff) | |
download | bitcoin-21656e99b5f489c881f9fe90b28edc4aac870ab0.tar.xz |
Merge bitcoin/bitcoin#29862: test: Validate oversized transactions or without inputs
969e047cfbab86e5819a2c9056e8d2dab17513a8 Replace hard-coded constant in test (Lőrinc)
327a31d1a4f0e9c7b22063bc725bbd160092c552 Validate oversized transaction (Lőrinc)
1984187840972a455f4c210f0cb576633ef5bddb Validate transaction without inputs (Lőrinc)
c3a884318981c7ebabd0b8e8023a14519e26c72b Use SCRIPT_VERIFY_NONE instead of hard-coded 0 in transaction_tests (Lőrinc)
Pull request description:
Based on https://maflcko.github.io/b-c-cov/test_bitcoin.coverage/src/consensus/tx_check.cpp.gcov.html empty inputs and oversized transactions weren't covered by Boost unit tests (though they're covered by [python](https://github.com/bitcoin/bitcoin/blob/master/test/functional/mempool_accept.py#L231) [tests](https://github.com/bitcoin/bitcoin/blob/master/test/functional/data/invalid_txs.py#L102)).
<img alt="image" src="https://github.com/bitcoin/bitcoin/assets/1841944/57a74ff5-5466-401f-a4fe-d79e36964adf">
I have tried including the empty transaction into [tx_invalid.json](https://github.com/bitcoin/bitcoin/blob/master/src/test/data/tx_invalid.json#L34-L36), but it failed for another reason, so I added a separate test case for it in the end.
The oversized tx data is on the failure threshold now (lower threshold fails for a different reason, but I guess that's fine, we're testing the boundary here).
ACKs for top commit:
achow101:
ACK 969e047cfbab86e5819a2c9056e8d2dab17513a8
tdb3:
ACK 969e047cfbab86e5819a2c9056e8d2dab17513a8 pending `MSan, depends` CI failure.
glozow:
utACK 969e047cfbab86e5819a2c9056e8d2dab17513a8
Tree-SHA512: 2a472690eabfdacc276b7e0414d3a4ebc75c227405b202c9fe3c8befad875f6e4d9b40c056fb05971ad3ae479c8f53edebb2eeeb700088856caf5cf58bfca0c1
Diffstat (limited to 'src/wallet/spend.cpp')
0 files changed, 0 insertions, 0 deletions