Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
driftluo committed Dec 24, 2024
1 parent 8cd654b commit 636ca0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,14 @@ impl RpcClient {
{
let url = self.url.clone();
let client = self.client.clone();
println!("3");

async move {
println!("4");
let resp = client.post(url).json(&json_post_params()?).send().await?;
println!("5");
let output = resp.json::<jsonrpc_core::response::Output>().await?;
println!("6");
match output {
jsonrpc_core::response::Output::Success(success) => {
serde_json::from_value(success.result).map_err(Into::into)
Expand Down
2 changes: 2 additions & 0 deletions src/tests/ckb_rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ pub static TRANSACTION_HASH_VEC: LazyLock<Vec<H256>> = LazyLock::new(|| {
#[test]
fn test_get_block() {
let ckb_client = CkbRpcClient::new(TEST_CKB_RPC_URL);
println!("1");
let block = ckb_client.get_block(BLOCK_HASH.clone()).unwrap();
println!("2");
let block = block.unwrap();
// println!("> block: {}", serde_json::to_string_pretty(&block).unwrap());
let block_from_json = core::BlockView::from(block);
Expand Down

0 comments on commit 636ca0b

Please sign in to comment.