test: add coverage for abandoning unconfirmed transaction #31943
pull rkrux wants to merge 1 commits into bitcoin:master from rkrux:mempool-abandon changing 1 files +4 −0-
rkrux commented at 10:20 am on February 24, 2025: contributorPrevious discussion: #31794#pullrequestreview-2605174936 Current Coverage: https://maflcko.github.io/b-c-cov/total.coverage/src/wallet/wallet.cpp.gcov.html#L1326
-
test: add coverage for abandoning unconfirmed transaction
Co-authored-by: Eunovo <eunovo9@gmail.com>
-
DrahtBot commented at 10:20 am on February 24, 2025: contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31943.
Reviews
See the guideline for information on the review process.
Type Reviewers ACK Eunovo, janb84, maflcko, brunoerg Concept ACK Prabhat1308 If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
-
DrahtBot added the label Tests on Feb 24, 2025
-
rkrux marked this as ready for review on Feb 24, 2025
-
Eunovo commented at 12:22 pm on February 24, 2025: contributor
-
Prabhat1308 commented at 11:26 pm on February 24, 2025: noneConcept ACK
073a017
-
maflcko commented at 10:11 am on February 25, 2025: member
Covers the previously uncovered
TransactionCanBeAbandoned()
function increasing the coverage .I don’t understand this comment.
TransactionCanBeAbandoned
is only called by the GUI, but this new test isn’t a gui test.Also, https://corecheck.dev/bitcoin/bitcoin/pulls/31943 doesn’t show new code coverage for
TransactionCanBeAbandoned
or anything else in wallet cpp -
Prabhat1308 commented at 10:32 am on February 25, 2025: none
I don’t understand this comment.
TransactionCanBeAbandoned
is only called by the GUI, but this new test isn’t a gui test.The confusion arose from my side . The RPC has the response
transaction not eligible for abandonment
and from the current coverage in the PR description (which I thought to be the pre-pull coverage) , the marked line was already covered. So , I incidently thought theTransactionCanBeAbandoned
to be the check for abandonment function refered to increase the coverage.Removed the comment.
-
rkrux commented at 11:09 am on February 25, 2025: contributor
I don’t understand this comment. TransactionCanBeAbandoned is only called by the GUI, but this new test isn’t a gui test.
Correct, this doesn’t cover
TransactionCanBeAbandoned
, which is called by GUI only. Instead, this covers the second condition in this if check here: https://github.com/bitcoin/bitcoin/blob/e486597f9a57903600656fb5106858941885852f/src/wallet/wallet.cpp#L1326C43-L1326C56Also, https://corecheck.dev/bitcoin/bitcoin/pulls/31943 doesn’t show new code coverage for TransactionCanBeAbandoned or anything else in wallet cpp
This is most likely because it checks on new lines covered by the code. However, this test doesn’t cover a new line but a new branch of the already covered line.
-
DrahtBot requested review from Prabhat1308 on Feb 25, 2025
-
maflcko commented at 8:43 pm on February 25, 2025: memberlgtm ACK 073a017016e62c7d52562aa61d942024379c110d
-
brunoerg approved
-
brunoerg commented at 2:34 pm on February 26, 2025: contributorutACK 073a017016e62c7d52562aa61d942024379c110d
-
fanquake merged this on Feb 26, 2025
-
fanquake closed this on Feb 26, 2025
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-03-29 06:12 UTC
More mirrored repositories can be found on mirror.b10c.me