This commit is contained in:
Ajinkya Kulkarni 2024-12-05 14:56:38 +01:00
parent f52f8e9184
commit 00d550787b

View file

@ -35,7 +35,6 @@ async fn get_fmspc_list() -> Vec<Fmspc> {
let fmspc: String = format!("{}", item["fmspc"]);
fmspc_list.push(strip_dquotes(&fmspc).unwrap().to_string());
}
println!("{:?}", fmspc_list);
fmspc_list
}
@ -57,7 +56,7 @@ async fn upsert_tcbinfo() -> Result<(), &'static str> {
let query_msg = QueryMsg::GetTcbInfo { fmspc: fmspc.clone() };
let tcbinfo_on_chain_json: Value = client.query_smart(&contract_address, json!(query_msg)).await.expect("contract query failed");
let tcbinfo_on_chain = &tcbinfo_on_chain_json["data"]["tcb_info"].to_string();
println!("{tcbinfo_on_chain} \n {tcbinfo_from_api}");
if *tcbinfo_on_chain != tcbinfo_from_api {
println!("updating on-chain TCBInfo for FMSPC: {fmspc}");
let chain_id = tendermint::chain::id::Id::try_from("pion-1").expect("invalid chain id");