Repository navigation
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.
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`. |
There was a problem hiding this comment.
not sure?
| //! API docs of Bitcoin Core `v29`. | |
| //! API docs of Bitcoin Core `v27`. |
There was a problem hiding this comment.
Thanks, I've changed it.
1aa95d1 to
a36ccc6
Compare
| /// 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.
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.
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.
There was a problem hiding this comment.
Ha, that has bitten me before too.
|
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
426e7b3 implement hidden RPC `getorphantxs` (0xb10c) Pull request description: > getorphantxs ( verbosity ) > Shows transactions in the tx orphanage. This implements the hidden `getorphantxs` RPC in the last commit. Depends on #432 and #433. Part of #333. Since the `expiry` and `entry` fields were dropped for v30 (this is an experimental RPC after all), there is a `into.rs` implementation for both v29 and v30. ACKs for top commit: jamillambert: ACK 426e7b3 tcharding: ACK 426e7b3 Tree-SHA512: 96213742a02382258bb94f4a8842baac79bd1bb3194a7c9ad501f1ece1328a156e3dd141e27bdd96eeac9dd43e90e23ce8aba57cd64902dcf4075a39dab4b35b
a7a8785 Add hidden RPC getrawaddrman (deadmanoz) Pull request description: Add support for the hidden `getrawaddrman` RPC that returns raw address manager table entries (added v26). This RPC is marked as experimental and hidden from the API docs by default. The `mapped_as` and `source_mapped_as` fields are `Option<u32>` following the established pattern for version-specific fields (no `into.rs` required because these are additions rather than removals or changed types). These fields were added in Bitcoin Core v28 and will deserialise as `None` for earlier versions or when `-asmap` is not configured. Note: will have conflicts with #435 and #433, happy to rebase after either merges ACKs for top commit: tcharding: ACK a7a8785 jamillambert: ACK a7a8785 Tree-SHA512: 592c499e6f129fafdc764c4fad729f18315a6f9baca3c16a74471929337b49366771db297789e2db89a7fe3602e2a2644f4de6221280098e8c136138a209756c
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.