Add Rpc interface#26
Conversation
|
tACK 1f30c7d |
|
Concept ACK |
1f30c7d to
d0ecafd
Compare
|
Rebased with master to resolve conflicts and force-pushed. |
|
In d0ecafd the test fails: I suggest reading some other RPC value, because the number of blocks is going to depend on the order in which tests are run. Other than that the code looks good to me. |
|
An alternative approach to get test coverage, without adding a new test, would be to take one of the RPC calls in https://github.com/2140-dev/bitcoin-capnp-types/blob/master/tests/util/bitcoin_core.rs and adjust it got via this RPC-over-IPC route. |
22998e8 to
6839ca4
Compare
bitcoin/bitcoin#32297 introduced the RPC interface for `bitcoin-cli`, allowing it to execute RPC commands over IPC. This commit adds the corresponding Cap'n Proto schema and includes a test that queries `uptime`.
6839ca4 to
214aec9
Compare
|
re: #26 (comment) Yes, you're right. This test depends on a fresh node start. Just updated it to query |
|
re: #26 (comment) I like this approach too, but I would keep the RPC-over-IPC test to demonstrate how to use the Rpc interface, consistent with how the other interfaces are tested in the same file. If everyone agrees, I can create a follow-up to move the existing JSON-RPC setup to IPC. |
bitcoin/bitcoin#32297 introduced the Rpc interface for
bitcoin-cli, allowing it to execute RPC commands over IPC. This commit adds the corresponding Cap'n Proto schema and includes a test that queriesuptime.