Skip to content
Tobin C. Harding edited this page Sep 2, 2024 · 1 revision

Example of how to add a new JSONRPC method to v17

  1. Start a local btc node using contrib/run_bitcoind.sh start v17

  2. Add the type to json/src/v17/blockchain.rs (and implement into_model())

  3. Re-export it from json/src/v17/mod.rs

  4. Add the type to json/src/model/blockchain.rs

  5. Re-export it from model/mod.rs

  6. Add impl_client_v17__getblockhash to client/src/client_sync/v17/blockchain.rs

  7. Call the macro in client/src/client_sync/v17/mod.rs

  8. Add impl_test_v17__getblockhash to integration_test/src/v17/blockchain.rs

  9. Call the macro in integration_test/tests/v17_api.rs

  10. Check it off in json/src/v17/mod.rs

  11. Run the formatter

  12. Run the test with cargo test --features=0_17_1 get_block_hash

Clone this wiki locally