-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
test: assert rpc error for addnode v2transport not enabled #29460
Conversation
Added coverage for the addnode rpc when v2transport is not enabled but is set as true when calling addnode rpc
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm ACK 345169a
Checked coverage per https://corecheck.dev/bitcoin/bitcoin/pulls/29460
@@ -12,6 +12,7 @@ | |||
from test_framework.util import ( | |||
assert_equal, | |||
p2p_port, | |||
assert_raises_rpc_error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 345169a
There was a problem hiding this 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
There was a problem hiding this 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
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