From 031a145fa9b95ea96bb5b1045d034424b0f43b17 Mon Sep 17 00:00:00 2001 From: shaorongqiang Date: Wed, 20 Sep 2023 10:40:38 +0800 Subject: [PATCH] fix --- src/components/contracts/rpc/src/eth_pubsub.rs | 6 +++--- src/components/finutils/src/bins/cfg_generator.rs | 2 +- src/ledger/src/store/mod.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/contracts/rpc/src/eth_pubsub.rs b/src/components/contracts/rpc/src/eth_pubsub.rs index 5f63d76fc..fb4347e58 100644 --- a/src/components/contracts/rpc/src/eth_pubsub.rs +++ b/src/components/contracts/rpc/src/eth_pubsub.rs @@ -219,9 +219,9 @@ impl SubscriptionResult { receipts: Vec, params: &FilteredParams, ) -> Vec { - let block_hash = Some(H256::from_slice( + let block_hash = H256::from_slice( Keccak256::digest(&rlp::encode(&block.header)).as_slice(), - )); + ); let mut logs: Vec = vec![]; let mut log_index: u32 = 0; for (receipt_index, receipt) in receipts.into_iter().enumerate() { @@ -239,7 +239,7 @@ impl SubscriptionResult { address: log.address, topics: log.topics, data: Bytes(log.data), - block_hash, + Some(block_hash), block_number: Some(block.header.number), transaction_hash, transaction_index: Some(U256::from(receipt_index)), diff --git a/src/components/finutils/src/bins/cfg_generator.rs b/src/components/finutils/src/bins/cfg_generator.rs index d42aa7aaf..8f0f7d950 100644 --- a/src/components/finutils/src/bins/cfg_generator.rs +++ b/src/components/finutils/src/bins/cfg_generator.rs @@ -63,7 +63,7 @@ fn gen() -> Result<()> { cfg_template .valiators .iter_mut() - .zip(id_list.into_iter()) + .zip(id_list) .for_each(|(v, id)| { v.id = id; }); diff --git a/src/ledger/src/store/mod.rs b/src/ledger/src/store/mod.rs index 20420d741..498776a22 100644 --- a/src/ledger/src/store/mod.rs +++ b/src/ledger/src/store/mod.rs @@ -1026,7 +1026,7 @@ impl LedgerState { let res = sids .into_iter() - .zip(aus.into_iter()) + .zip(aus) .filter_map(|(sid, au)| au.map(|au| (sid, au))) .map(|(sid, au)| { (