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

[Do no merge] #2285 Debug PR #2315

Closed
wants to merge 2 commits into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ impl<B: Block> OnDemandJustificationsEngine<B> {
}

fn request_from_peer(&mut self, peer: PeerId, req_info: RequestInfo<B>) {
debug!(
target: BEEFY_SYNC_LOG_TARGET,
"🥩 requesting justif #{:?} from peer {:?}", req_info.block, peer,
);
// debug!(
// target: BEEFY_SYNC_LOG_TARGET,
// "🥩 requesting justif #{:?} from peer {:?}", req_info.block, peer,
// );

let payload = JustificationRequest::<B> { begin: req_info.block }.encode();

Expand Down Expand Up @@ -184,13 +184,13 @@ impl<B: Block> OnDemandJustificationsEngine<B> {
Error::ResponseError
})?
.map_err(|e| {
debug!(
target: BEEFY_SYNC_LOG_TARGET,
"🥩 for on demand justification #{:?}, peer {:?} error: {:?}",
req_info.block,
peer,
e
);
// debug!(
// target: BEEFY_SYNC_LOG_TARGET,
// "🥩 for on demand justification #{:?}, peer {:?} error: {:?}",
// req_info.block,
// peer,
// e
// );
match e {
RequestFailure::Refused => {
metric_inc!(self, beefy_on_demand_justification_peer_refused);
Expand Down
2 changes: 2 additions & 0 deletions substrate/client/consensus/beefy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ use crate::{
round::Rounds,
worker::PersistedState,
};
use codec::Encode;
use futures::{stream::Fuse, StreamExt};
use log::{debug, error, info};
use parking_lot::Mutex;
Expand Down Expand Up @@ -376,6 +377,7 @@ where
// Overwrite persisted data with newly provided `min_block_delta`.
state.set_min_block_delta(min_block_delta);
info!(target: LOG_TARGET, "🥩 Loading BEEFY voter state from db: {:?}.", state);
error!(target: LOG_TARGET, "🥩 raw BEEFY voter state from db: {:?}.", state.encode());
Some(Ok(state))
})
// No valid voter-state persisted, re-initialize from pallet genesis.
Expand Down
2 changes: 1 addition & 1 deletion substrate/utils/wasm-builder/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ fn generate_crate_skip_build_env_name() -> String {

/// Checks if the build of the WASM binary should be skipped.
fn check_skip_build() -> bool {
env::var(crate::SKIP_BUILD_ENV).is_ok() ||
env::var(crate::SKIP_BUILD_ENV) == Ok("1".to_string()) ||
env::var(generate_crate_skip_build_env_name()).is_ok() ||
// If we are running in docs.rs, let's skip building.
// https://docs.rs/about/builds#detecting-docsrs
Expand Down
2 changes: 1 addition & 1 deletion substrate/utils/wasm-builder/src/wasm_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ fn build_bloaty_blob(
// env variable.
.env_remove("CARGO_ENCODED_RUSTFLAGS")
// We don't want to call ourselves recursively
.env(crate::SKIP_BUILD_ENV, "");
.env(crate::SKIP_BUILD_ENV, "1");

if super::color_output_enabled() {
build_cmd.arg("--color=always");
Expand Down
Loading