diff --git a/wallet/src/main.rs b/wallet/src/main.rs index 43c42309..526e1243 100644 --- a/wallet/src/main.rs +++ b/wallet/src/main.rs @@ -4,9 +4,16 @@ use clap::Parser; use jsonrpsee::http_client::HttpClientBuilder; use parity_scale_codec::{Decode, Encode}; use runtime::{OuterConstraintChecker, OuterVerifier}; -use sp_runtime::{generic::{Block, Header}, traits::BlakeTwo256}; +use sp_runtime::{ + generic::{Block, Header}, + traits::BlakeTwo256, +}; use std::path::PathBuf; -use tuxedo_core::{types::{OutputRef, Transaction}, verifier::*, SimpleConstraintChecker}; +use tuxedo_core::{ + types::{OutputRef, Transaction}, + verifier::*, + SimpleConstraintChecker, +}; use sp_core::H256; @@ -94,9 +101,14 @@ async fn main() -> anyhow::Result<()> { let node_genesis_hash = rpc::node_get_block_hash(0, &client) .await? .expect("node should be able to return some genesis hash"); - let node_genesis_block = rpc::node_get_block::, Transaction>>>(node_genesis_hash, &client) - .await? - .expect("node should be able to return some genesis block"); + let node_genesis_block = rpc::node_get_block::< + Block< + Header, + Transaction>, + >, + >(node_genesis_hash, &client) + .await? + .expect("node should be able to return some genesis block"); log::debug!("Node's Genesis block::{:?}", node_genesis_hash); // Open the local database diff --git a/wallet/src/rpc.rs b/wallet/src/rpc.rs index fca5a9f1..5a7ea535 100644 --- a/wallet/src/rpc.rs +++ b/wallet/src/rpc.rs @@ -5,11 +5,12 @@ use crate::strip_0x_prefix; use anyhow::anyhow; use jsonrpsee::{core::client::ClientT, http_client::HttpClient, rpc_params}; use parity_scale_codec::{Decode, Encode}; -use runtime::{opaque::Block as OpaqueBlock}; +use runtime::opaque::Block as OpaqueBlock; use sp_core::H256; use sp_runtime::generic::Block; use tuxedo_core::{ - types::{Output, OutputRef, Transaction}, ConstraintChecker, Verifier + types::{Output, OutputRef, Transaction}, + ConstraintChecker, Verifier, }; /// Typed helper to get the Node's block hash at a particular height @@ -21,7 +22,10 @@ pub async fn node_get_block_hash(height: u32, client: &HttpClient) -> anyhow::Re } /// Typed helper to get the node's full block at a particular hash -pub async fn node_get_block(hash: H256, client: &HttpClient) -> anyhow::Result> { +pub async fn node_get_block( + hash: H256, + client: &HttpClient, +) -> anyhow::Result> { let s = hex::encode(hash.0); let params = rpc_params![s];