Skip to content

Commit

Permalink
fix rustc version (#1010)
Browse files Browse the repository at this point in the history
* fix rustc version

* fix dockerfile

* fix

---------

Co-authored-by: shaorongqiang <[email protected]>
  • Loading branch information
shaorongqiang and shaorongqiang committed Sep 21, 2023
1 parent f9414d1 commit 198bcee
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
6 changes: 3 additions & 3 deletions container/Dockerfile-binary-image-dev
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions container/Dockerfile-binary-image-release
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.70
stable
9 changes: 4 additions & 5 deletions src/components/contracts/rpc/src/eth_pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,8 @@ impl SubscriptionResult {
receipts: Vec<Receipt>,
params: &FilteredParams,
) -> Vec<Log> {
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<Log> = vec![];
let mut log_index: u32 = 0;
for (receipt_index, receipt) in receipts.into_iter().enumerate() {
Expand All @@ -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)),
Expand Down
2 changes: 1 addition & 1 deletion src/components/finutils/src/bins/cfg_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down
2 changes: 1 addition & 1 deletion src/ledger/src/store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)| {
(
Expand Down

0 comments on commit 198bcee

Please sign in to comment.