From 5663582fe7b5f96d91be94443b1370b675db3649 Mon Sep 17 00:00:00 2001 From: shaorongqiang Date: Wed, 20 Sep 2023 10:16:41 +0800 Subject: [PATCH 1/3] fix rustc version --- rust-toolchain | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain b/rust-toolchain index bfe79d0bd..2bf5ad044 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.70 +stable From 285eb739010c7f9e435e3fff30ab979933500f94 Mon Sep 17 00:00:00 2001 From: shaorongqiang Date: Wed, 20 Sep 2023 10:28:10 +0800 Subject: [PATCH 2/3] fix dockerfile --- container/Dockerfile-binary-image-dev | 6 +++--- container/Dockerfile-binary-image-release | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/container/Dockerfile-binary-image-dev b/container/Dockerfile-binary-image-dev index 0b4306c7f..d9ad5e587 100644 --- a/container/Dockerfile-binary-image-dev +++ b/container/Dockerfile-binary-image-dev @@ -7,9 +7,9 @@ ENV PATH=$PATH:/root/.cargo/bin/ COPY . $WORK_DIR WORKDIR $WORK_DIR -RUN rustup toolchain install 1.70 && \ - rustup component add clippy --toolchain 1.70 && \ - rustup component add rustfmt --toolchain 1.70 +RUN rustup toolchain install stable && \ + rustup component add clippy --toolchain stable && \ + rustup component add rustfmt --toolchain stable RUN mkdir /binary RUN mkdir -p /binary/cleveldb && mkdir -p /binary/goleveldb diff --git a/container/Dockerfile-binary-image-release b/container/Dockerfile-binary-image-release index 4a3a5f0e6..44af02908 100644 --- a/container/Dockerfile-binary-image-release +++ b/container/Dockerfile-binary-image-release @@ -7,9 +7,9 @@ ENV PATH=$PATH:/root/.cargo/bin/ COPY . $WORK_DIR WORKDIR $WORK_DIR -RUN rustup toolchain install 1.70 && \ - rustup component add clippy --toolchain 1.70 && \ - rustup component add rustfmt --toolchain 1.70 +RUN rustup toolchain install stable && \ + rustup component add clippy --toolchain stable && \ + rustup component add rustfmt --toolchain stable RUN mkdir /binary RUN mkdir -p /binary/cleveldb && mkdir -p /binary/goleveldb From 31fd23a1c8eb4d689c3c7ad0ca0fd92726ad1cf6 Mon Sep 17 00:00:00 2001 From: shaorongqiang Date: Wed, 20 Sep 2023 10:40:38 +0800 Subject: [PATCH 3/3] fix --- src/components/contracts/rpc/src/eth_pubsub.rs | 9 ++++----- src/components/finutils/src/bins/cfg_generator.rs | 2 +- src/ledger/src/store/mod.rs | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/components/contracts/rpc/src/eth_pubsub.rs b/src/components/contracts/rpc/src/eth_pubsub.rs index 5f63d76fc..25b744a44 100644 --- a/src/components/contracts/rpc/src/eth_pubsub.rs +++ b/src/components/contracts/rpc/src/eth_pubsub.rs @@ -219,9 +219,8 @@ impl SubscriptionResult { receipts: Vec, params: &FilteredParams, ) -> Vec { - let block_hash = Some(H256::from_slice( - Keccak256::digest(&rlp::encode(&block.header)).as_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() { @@ -234,12 +233,12 @@ impl SubscriptionResult { None }; for (transaction_log_index, log) in receipt.logs.into_iter().enumerate() { - if self.add_log(block_hash.unwrap(), &log, &block, params) { + if self.add_log(block_hash, &log, &block, params) { logs.push(Log { address: log.address, topics: log.topics, data: Bytes(log.data), - block_hash, + 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)| { (