-
Notifications
You must be signed in to change notification settings - Fork 42
Implement hidden RPC addconnection
#433
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
base: master
Are you sure you want to change the base?
Implement hidden RPC addconnection
#433
Conversation
0d6509d to
783833e
Compare
|
CI failure is unrelated #434. EDIT: CI now passes, but no changes were made to the code that caused the failure. |
783833e to
b453c71
Compare
|
Can be rebased now mate. |
b453c71 to
1aa95d1
Compare
|
Rebased, no changes. |
0xB10C
left a comment
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.
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!
client/src/client_sync/v27/hidden.rs
Outdated
| //! 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`. |
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.
not sure?
| //! API docs of Bitcoin Core `v29`. | |
| //! API docs of Bitcoin Core `v27`. |
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.
Thanks, I've changed it.
1aa95d1 to
a36ccc6
Compare
types/src/model/hidden.rs
Outdated
| /// 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, | ||
| } | ||
|
|
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.
We don't need this in model because there are no concrete types from rust-bitcoin, only Strings.
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.
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.
|
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.
a36ccc6 to
224200d
Compare
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.