Allow warnings (#2627)

This commit is contained in:
Pierre Krieger
2019-05-20 23:14:02 +02:00
committed by DemiMarie-parity
parent 85ce4623ce
commit b9c39d771a
2 changed files with 2 additions and 5 deletions
+2 -3
View File
@@ -533,7 +533,6 @@ impl<B: Block, C, E, I, Error, SO> SlotWorker<B> for BabeWorker<C, E, I, SO> whe
/// This digest item will always return `Some` when used with `as_babe_seal`. /// This digest item will always return `Some` when used with `as_babe_seal`.
// //
// FIXME #1018 needs misbehavior types // FIXME #1018 needs misbehavior types
#[forbid(warnings)]
fn check_header<B: Block + Sized, C: AuxStore>( fn check_header<B: Block + Sized, C: AuxStore>(
client: &Arc<C>, client: &Arc<C>,
slot_now: u64, slot_now: u64,
@@ -585,7 +584,7 @@ fn check_header<B: Block + Sized, C: AuxStore>(
format!("VRF verification failed") format!("VRF verification failed")
})? })?
}; };
if check(&inout, threshold) { if check(&inout, threshold) {
match check_equivocation(&client, slot_now, slot_num, header.clone(), signer.clone()) { match check_equivocation(&client, slot_now, slot_num, header.clone(), signer.clone()) {
Ok(Some(equivocation_proof)) => { Ok(Some(equivocation_proof)) => {
@@ -1015,7 +1014,7 @@ mod tests {
Default::default(), Default::default(),
0, 0,
); );
let (inout, proof, _batchable_proof) = get_keypair(&pair).vrf_sign_n_check(transcript, |inout| check(inout, u64::MAX)).unwrap(); 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 pre_hash: H256 = header.hash();
let to_sign = (slot_num, pre_hash, proof.to_bytes()).encode(); let to_sign = (slot_num, pre_hash, proof.to_bytes()).encode();
@@ -51,8 +51,6 @@
//! number (this is num(signal) + N). When finalizing a block, we either apply //! 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 //! or prune any signaled changes based on whether the signaling block is
//! included in the newly-finalized chain. //! 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 futures::prelude::*;
use log::{debug, info, warn}; use log::{debug, info, warn};