mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-01 02:11:01 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user