From d903a00e6accb7adc3ac5c4fb66ae436a14237ae Mon Sep 17 00:00:00 2001 From: fewensa Date: Thu, 21 Oct 2021 14:36:45 +0800 Subject: [PATCH 1/3] check message type --- task/task-pangolin-pangoro/src/service/relay.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/task/task-pangolin-pangoro/src/service/relay.rs b/task/task-pangolin-pangoro/src/service/relay.rs index cada23289..d30377b46 100644 --- a/task/task-pangolin-pangoro/src/service/relay.rs +++ b/task/task-pangolin-pangoro/src/service/relay.rs @@ -55,7 +55,11 @@ impl Service for RelayService { let _greet = Self::try_task( &format!("{}-relay", PangolinPangoroTask::NAME), async move { - while let Some(_message) = rx.recv().await { + while let Some(message) = rx.recv().await { + match message { + PangolinPangoroMessageSend::Relay => {} + _ => continue, + } let (source_chain, target_chain) = ( config_pangolin.to_chain_info_with_expect_signer( config_relay.signer_pangolin.clone(), From 4b5e034c439e68af436637a24ca8ebefd9b6c06e Mon Sep 17 00:00:00 2001 From: fewensa Date: Fri, 22 Oct 2021 09:48:47 +0800 Subject: [PATCH 2/3] Update toolchain to `nightly-2021-04-22` --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- .maintain/docker/Dockerfile.publish-docker-image | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8ebaa0a5..5b20a4966 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Install latest nightly uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2021-09-01 + toolchain: nightly-2021-04-22 override: true target: wasm32-unknown-unknown diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 100159f54..b5ac2b912 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: - name: Build bridger env: - RUST_TOOLCHAIN: nightly-2021-09-01 + RUST_TOOLCHAIN: nightly-2021-04-22 run: | .maintain/setup-bridger.sh diff --git a/.maintain/docker/Dockerfile.publish-docker-image b/.maintain/docker/Dockerfile.publish-docker-image index 5a7391860..bf1ed5188 100644 --- a/.maintain/docker/Dockerfile.publish-docker-image +++ b/.maintain/docker/Dockerfile.publish-docker-image @@ -4,7 +4,7 @@ FROM rust:1 as builder -ARG RUST_TOOLCHAIN=nightly-2021-09-01 +ARG RUST_TOOLCHAIN=nightly-2021-04-22 ENV CARGO_TERM_COLOR=always RUN rustup update \ From 15ea7959889d5fc8c2915b801585fb41720ddbfe Mon Sep 17 00:00:00 2001 From: fewensa Date: Fri, 22 Oct 2021 10:11:23 +0800 Subject: [PATCH 3/3] clippy --- task/task-darwinia-ethereum/src/migrate/v2.rs | 4 ++-- task/task-pangolin-ropsten/src/migrate/v2.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/task/task-darwinia-ethereum/src/migrate/v2.rs b/task/task-darwinia-ethereum/src/migrate/v2.rs index 791caf14c..959dbcedf 100644 --- a/task/task-darwinia-ethereum/src/migrate/v2.rs +++ b/task/task-darwinia-ethereum/src/migrate/v2.rs @@ -13,7 +13,7 @@ pub fn migrate(state: &BridgeState) -> anyhow::Result<()> { } fn migrate_tracker_ethereum(microkv: &NamespaceMicroKV) -> anyhow::Result<()> { - for key in [ + for key in &[ "scan.ethereum.running", "scan.ethereum.finish", "scan.ethereum.current", @@ -43,7 +43,7 @@ fn migrate_tracker_darwinia(microkv: &NamespaceMicroKV) -> anyhow::Result<()> { microkv.put("scan.darwinia.current", &value.as_u64().unwrap_or(0))?; } } - for key in [ + for key in &[ "scan.darwinia.finish", "scan.darwinia.next", "scan.darwinia.skipped", diff --git a/task/task-pangolin-ropsten/src/migrate/v2.rs b/task/task-pangolin-ropsten/src/migrate/v2.rs index d7d1273fa..fd09eb7f6 100644 --- a/task/task-pangolin-ropsten/src/migrate/v2.rs +++ b/task/task-pangolin-ropsten/src/migrate/v2.rs @@ -13,7 +13,7 @@ pub fn migrate(state: &BridgeState) -> anyhow::Result<()> { } fn migrate_tracker_ropsten(microkv: &NamespaceMicroKV) -> anyhow::Result<()> { - for key in [ + for key in &[ "scan.ropsten.running", "scan.ropsten.finish", "scan.ropsten.current", @@ -43,7 +43,7 @@ fn migrate_tracker_pangolin(microkv: &NamespaceMicroKV) -> anyhow::Result<()> { microkv.put("scan.pangolin.current", &value.as_u64().unwrap_or(0))?; } } - for key in [ + for key in &[ "scan.pangolin.finish", "scan.pangolin.next", "scan.pangolin.skipped",