Move bitcoin-serai to core-json and feature-gate the RPC functionality

This commit is contained in:
Luke Parker
2025-11-10 04:24:07 -05:00
parent 7e774d6d2d
commit 927f07b62b
6 changed files with 101 additions and 55 deletions

View File

@@ -14,9 +14,9 @@ pub(crate) async fn rpc() -> Rpc {
// If this node has already been interacted with, clear its chain
if rpc.get_latest_block_number().await.unwrap() > 0 {
rpc
.rpc_call(
.call(
"invalidateblock",
serde_json::json!([hex::encode(rpc.get_block_hash(1).await.unwrap())]),
&format!(r#"["{}"]"#, hex::encode(rpc.get_block_hash(1).await.unwrap())),
)
.await
.unwrap()