Repository navigation
Fix getnodeaddresses test - #334
Merged
tcharding merged 4 commits intoAug 20, 2025
Merged
Conversation
This RPC is excluded from Core documentation by default. Add a new section `Hidden` including a module in `types`. Create the struct and client macro.
jamillambert
force-pushed
the
0819-getnodeaddresses-test
branch
3 times, most recently
from
August 19, 2025 17:41
404638a to
8d40dbe
Compare
`getnodeaddresses` was updated in v22 not v27. Move the redefinition to v22 and update the reexports.
jamillambert
force-pushed
the
0819-getnodeaddresses-test
branch
from
August 19, 2025 17:44
8d40dbe to
b906ea7
Compare
Collaborator
Author
|
Thanks to @0xB10C for showing us how to fix this in the related issue. |
jamillambert
force-pushed
the
0819-getnodeaddresses-test
branch
from
August 19, 2025 17:50
b906ea7 to
c9cf940
Compare
The return shape of the RPC is not tested since an empty list is returned. Use the hidden RPC `addpeeraddress` for v21 and later to add an address to the address manager table in the test. Assert that the returned `GetNodeAddresses` contains the added peer address and port.
Reordering of the reexports only.
5 of 12 tasks
tcharding
reviewed
Aug 20, 2025
|
|
||
| /// Implements Bitcoin Core JSON-RPC API method `addpeeraddress`. | ||
| #[macro_export] | ||
| macro_rules! impl_client_v21_add_peer_address { |
Member
There was a problem hiding this comment.
Suggested change
| macro_rules! impl_client_v21_add_peer_address { | |
| macro_rules! impl_client_v21__add_peer_address { |
tcharding
approved these changes
Aug 20, 2025
blaze-smith470pm
added a commit
to blaze-smith470pm/corepc
that referenced
this pull request
Sep 26, 2025
c9cf9406ab355964ed1924b31f1bb7fc2a8a1a0f Run the formatter (Jamil Lambert, PhD)
5bdcdc8ce414ebacebce2805b76513c95881adb8 Fix getnodeaddresses test (Jamil Lambert, PhD)
8be0a12d742190a2ba0431534bd024f6adffa1bc Move getnodeaddresses redefinition from v27 to v22 (Jamil Lambert, PhD)
cfbba65c056d502b49e5397062278ff310c0df53 Add hidden RPC addpeeraddress to v21 (Jamil Lambert, PhD)
Pull request description:
The return shape of the RPC is not tested since an empty list is returned.
- Add the hidden RPC `addpeeraddress` in v21 in a new module called `hidden`.
- In the `getnodeaddresses` test use the hidden RPC `addpeeraddress` for v21 and later to add an address to the address manager table. Assert that the returned `GetNodeAddresses` contains the added peer address and port.
Closes #320
ACKs for top commit:
tcharding:
ACK c9cf9406ab355964ed1924b31f1bb7fc2a8a1a0f
Tree-SHA512: 42e51f6345b59ae8108a9a9624da8bdec1458d102eaf70548fc9eee8ad09db3b33ac1985e9617db49260f1cc09ef1a5d7fb469f7da218d0c6ca035947c796c96
deadmanoz
added a commit
to deadmanoz/corepc
that referenced
this pull request
Dec 17, 2025
This RPC is excluded from Core documentation by default. Add types and client macro in hidden modules following the pattern from addpeeraddress (rust-bitcoin#334). Includes support for optional asmap fields (mapped_as, source_mapped_as).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The return shape of the RPC is not tested since an empty list is returned.
Add the hidden RPC
addpeeraddressin v21 in a new module calledhidden.In the
getnodeaddressestest use the hidden RPCaddpeeraddressfor v21 and later to add an address to the address manager table. Assert that the returnedGetNodeAddressescontains the added peer address and port.Closes #320