Skip to content

Conversation

@jamillambert
Copy link
Collaborator

@jamillambert jamillambert commented Dec 17, 2025

Implement the RPC in v22 hidden module, add the client macro, model and test.
Redefine the client macro in v29 where there is an added required argument.
Add all the reexports up to v30.

@jamillambert
Copy link
Collaborator Author

jamillambert commented Dec 17, 2025

CI failure is unrelated #434.

EDIT: CI now passes, but no changes were made to the code that caused the failure.

@jamillambert jamillambert marked this pull request as draft December 17, 2025 21:51
@jamillambert jamillambert force-pushed the 1217-hidden-addconnection branch from 783833e to b453c71 Compare December 17, 2025 21:52
@tcharding
Copy link
Member

Can be rebased now mate.

@jamillambert jamillambert force-pushed the 1217-hidden-addconnection branch from b453c71 to 1aa95d1 Compare December 30, 2025 09:31
@jamillambert jamillambert marked this pull request as ready for review December 30, 2025 09:32
@jamillambert
Copy link
Collaborator Author

Rebased, no changes.

Copy link
Contributor

@0xB10C 0xB10C left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Having this in https://github.com/peer-observer/peer-observer/tree/master/extractors/p2p will make the integration tests a lot easier and less brittle, thanks!

//! Macros for implementing JSON-RPC methods on a client.
//!
//! Specifically this is `== Hidden ==` methods that are not listed in the
//! API docs of Bitcoin Core `v29`.
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure?

Suggested change
//! API docs of Bitcoin Core `v29`.
//! API docs of Bitcoin Core `v27`.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, I've changed it.

@jamillambert jamillambert force-pushed the 1217-hidden-addconnection branch from 1aa95d1 to a36ccc6 Compare December 30, 2025 10:12
Comment on lines 11 to 19
/// Models the result of JSON-RPC method `addconnection`.
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct AddConnection {
/// The address of the newly added connection.
pub address: String,
/// Type of connection.
pub connection_type: String,
}

Copy link
Member

Choose a reason for hiding this comment

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

We don't need this in model because there are no concrete types from rust-bitcoin, only Strings.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep I did extra work for no reason. I just saw address and thought needs a model, and obviously never removed it once I realised it was a network address.

Removed now.

@tcharding
Copy link
Member

Everything else looks good. Reviewed: a36ccc6

Implement the RPC in v22 hidden module, add the client macro, model and
test.
Redefine the client macro in v27 where there is an added required
argument.
Add all the reexports up to v30.
@jamillambert jamillambert force-pushed the 1217-hidden-addconnection branch from a36ccc6 to 224200d Compare December 31, 2025 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants