diff --git a/substrate/core/consensus/babe/src/lib.rs b/substrate/core/consensus/babe/src/lib.rs index 3c720db627..c3d73b6e49 100644 --- a/substrate/core/consensus/babe/src/lib.rs +++ b/substrate/core/consensus/babe/src/lib.rs @@ -533,6 +533,7 @@ impl SlotWorker for BabeWorker whe /// This digest item will always return `Some` when used with `as_babe_seal`. // // FIXME #1018 needs misbehavior types +#[forbid(warnings)] fn check_header( client: &Arc, slot_now: u64, @@ -584,7 +585,7 @@ fn check_header( format!("VRF verification failed") })? }; - + if check(&inout, threshold) { match check_equivocation(&client, slot_now, slot_num, header.clone(), signer.clone()) { Ok(Some(equivocation_proof)) => { @@ -1018,7 +1019,7 @@ mod tests { Default::default(), 0, ); - + let (inout, proof, _batchable_proof) = get_keypair(&pair).vrf_sign_n_check(transcript, |inout| check(inout, u64::MAX)).unwrap(); let pre_hash: H256 = header.hash(); let to_sign = (slot_num, pre_hash, proof.to_bytes()).encode(); diff --git a/substrate/core/finality-grandpa/src/lib.rs b/substrate/core/finality-grandpa/src/lib.rs index f9f2016cc9..9d808bf4d5 100644 --- a/substrate/core/finality-grandpa/src/lib.rs +++ b/substrate/core/finality-grandpa/src/lib.rs @@ -51,6 +51,8 @@ //! number (this is num(signal) + N). When finalizing a block, we either apply //! or prune any signaled changes based on whether the signaling block is //! included in the newly-finalized chain. +#![forbid(warnings)] +#![allow(deprecated)] // FIXME #2532: remove once the refactor is done https://github.com/paritytech/substrate/issues/2532 use futures::prelude::*; use log::{debug, info, warn};