Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: assert rpc error for addnode v2transport not enabled #29460

Merged

Conversation

kevkevinpal
Copy link
Contributor

Added coverage for the addnode rpc when v2transport is not enabled,
but is set as true when calling addnode rpc.

I ran the following to check if this rpc error message
was covered in the functional tests.
grep -nr "v2transport requested but not enabled" ./test/functional --binary-files=without-match

Adds test coverage to this line.
https://github.com/bitcoin/bitcoin/blob/master/src/rpc/net.cpp#L339

Added coverage for the addnode rpc when v2transport is not enabled but
is set as true when calling addnode rpc
@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 21, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK maflcko, brunoerg, BrandonOdiwuor, theStack

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@DrahtBot DrahtBot added the Tests label Feb 21, 2024
Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -12,6 +12,7 @@
from test_framework.util import (
assert_equal,
p2p_port,
assert_raises_rpc_error
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert_raises_rpc_error
assert_raises_rpc_error,

nit (only if you re-touch for other reasons): Please always add the trailing comma, to avoid having to touch this line again in the future when a new item is added to the list. Also, could sort.

Copy link
Contributor

@brunoerg brunoerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 345169a

Copy link
Contributor

@BrandonOdiwuor BrandonOdiwuor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review ACK 345169a

Copy link
Contributor

@theStack theStack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code-review ACK 345169a

@fanquake fanquake merged commit 2ac41ef into bitcoin:master Feb 21, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants