From aaba77e14cb213273b244acf07c7616b39216e99 Mon Sep 17 00:00:00 2001 From: smtmfft Date: Tue, 20 Feb 2024 07:27:01 +0000 Subject: [PATCH] code fmt --- lib/src/taiko/host.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/src/taiko/host.rs b/lib/src/taiko/host.rs index b0fda4c7..df65561d 100644 --- a/lib/src/taiko/host.rs +++ b/lib/src/taiko/host.rs @@ -2,6 +2,7 @@ use alloy_sol_types::sol_data::FixedBytes; use anyhow::Result; use ethers_core::types::{Block, Transaction as EthersTransaction, H160, H256, U256}; use reqwest; +use reth_primitives::eip4844::kzg_to_versioned_hash; use serde::Deserialize; use sha2::{Digest, Sha256}; use tracing::info; @@ -24,8 +25,6 @@ use crate::{ taiko::{precheck::rebuild_and_precheck_block, Layer}, }; -use reth_primitives::eip4844::kzg_to_versioned_hash; - #[derive(Debug)] pub struct TaikoExtra { pub l1_hash: B256, @@ -281,7 +280,7 @@ fn decode_blob_data(blob: &str) -> Vec { fn calc_blob_hash(commitment: &String) -> [u8; 32] { let commit_bytes = hex::decode(commitment.to_lowercase().trim_start_matches("0x")).unwrap(); let kzg_commit = c_kzg::KzgCommitment::from_bytes(&commit_bytes).unwrap(); - let version_hash: [u8;32] = kzg_to_versioned_hash(kzg_commit).0.clone(); + let version_hash: [u8; 32] = kzg_to_versioned_hash(kzg_commit).0.clone(); version_hash } @@ -432,9 +431,10 @@ pub fn get_taiko_initial_data