depend-o-pocalipse (#9450)

Remove unneeded dependencies and dev-dependencies.
Made self_destruct test not dependent on wasm bin size.  
Updated code related to deprecated warning on tracing-subscriber `scope()` 
( See https://github.com/tokio-rs/tracing/issues/1429 )
This commit is contained in:
Squirrel
2021-08-13 15:18:37 +01:00
committed by GitHub
parent 76504e56d7
commit 7e9b8d278e
129 changed files with 487 additions and 726 deletions
@@ -1194,19 +1194,21 @@ impl<Block: BlockT> Inner<Block> {
catch_up_request: &CatchUpRequestMessage,
) -> (bool, Option<Report>) {
let report = match &self.pending_catch_up {
PendingCatchUp::Requesting { who: peer, instant, .. } =>
PendingCatchUp::Requesting { who: peer, instant, .. } => {
if instant.elapsed() <= CATCH_UP_REQUEST_TIMEOUT {
return (false, None)
} else {
// report peer for timeout
Some((peer.clone(), cost::CATCH_UP_REQUEST_TIMEOUT))
},
PendingCatchUp::Processing { instant, .. } =>
}
},
PendingCatchUp::Processing { instant, .. } => {
if instant.elapsed() < CATCH_UP_PROCESS_TIMEOUT {
return (false, None)
} else {
None
},
}
},
_ => None,
};
@@ -684,18 +684,21 @@ impl<Block: BlockT> Sink<Message<Block>> for OutgoingMessages<Block> {
fn start_send(mut self: Pin<&mut Self>, mut msg: Message<Block>) -> Result<(), Self::Error> {
// if we've voted on this round previously under the same key, send that vote instead
match &mut msg {
finality_grandpa::Message::PrimaryPropose(ref mut vote) =>
finality_grandpa::Message::PrimaryPropose(ref mut vote) => {
if let Some(propose) = self.has_voted.propose() {
*vote = propose.clone();
},
finality_grandpa::Message::Prevote(ref mut vote) =>
}
},
finality_grandpa::Message::Prevote(ref mut vote) => {
if let Some(prevote) = self.has_voted.prevote() {
*vote = prevote.clone();
},
finality_grandpa::Message::Precommit(ref mut vote) =>
}
},
finality_grandpa::Message::Precommit(ref mut vote) => {
if let Some(precommit) = self.has_voted.precommit() {
*vote = precommit.clone();
},
}
},
}
// when locals exist, sign messages on import