From 2df365272e3f5b49c1588653e6c98caea1da7351 Mon Sep 17 00:00:00 2001 From: Robert Klotzner Date: Mon, 13 Sep 2021 13:17:40 +0200 Subject: [PATCH 1/2] Better error messages. Right now, logged messages are hardly useful. Together with https://github.com/paritytech/substrate/pull/9768, this should help with debugging. --- node/network/protocol/src/request_response/outgoing.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/network/protocol/src/request_response/outgoing.rs b/node/network/protocol/src/request_response/outgoing.rs index 38e3c44c7dae..e76b7b0eaac2 100644 --- a/node/network/protocol/src/request_response/outgoing.rs +++ b/node/network/protocol/src/request_response/outgoing.rs @@ -82,11 +82,11 @@ pub type ResponseSender = oneshot::Sender, network::RequestFailur #[derive(Debug, Error)] pub enum RequestError { /// Response could not be decoded. - #[error("Response could not be decoded")] + #[error("Response could not be decoded: {0}")] InvalidResponse(#[source] DecodingError), /// Some error in substrate/libp2p happened. - #[error("Some network error occurred")] + #[error("{0}")] NetworkError(#[source] network::RequestFailure), /// Response got canceled by networking. From 2dee44ca6ed6b1335c4b75069ccecb30ad6dc26b Mon Sep 17 00:00:00 2001 From: Robert Klotzner Date: Tue, 14 Sep 2021 11:25:58 +0200 Subject: [PATCH 2/2] cargo fmt --- runtime/common/src/elections.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/common/src/elections.rs b/runtime/common/src/elections.rs index 4e2b080bfc21..52487e070dbc 100644 --- a/runtime/common/src/elections.rs +++ b/runtime/common/src/elections.rs @@ -60,7 +60,8 @@ impl pallet_election_provider_multi_phase::BenchmarkingConfig for BenchmarkConfi pub type OnOnChainAccuracy = sp_runtime::Perbill; /// The election provider of the genesis -pub type GenesisElectionOf = frame_election_provider_support::onchain::OnChainSequentialPhragmen; +pub type GenesisElectionOf = + frame_election_provider_support::onchain::OnChainSequentialPhragmen; /// Maximum number of iterations for balancing that will be executed in the embedded miner of /// pallet-election-provider-multi-phase.