Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix rustc version #1010

Merged
merged 3 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading