Stop authoring blocks when offline (#1655)

* Don't author blocks when offline

* Increased canonicalization delay

* Fixed test
This commit is contained in:
Arkadiy Paronyan
2019-02-01 17:17:53 +01:00
committed by Gav Wood
parent 2155e44e13
commit 641bb7cb46
7 changed files with 26 additions and 2 deletions
+1 -1
View File
@@ -433,7 +433,7 @@ impl<B: BlockT, S: NetworkSpecialization<B>, H: ExHashT> Protocol<B, S, H> {
}
debug!(target: "sync", "{} clogging messages:", clogging_messages.len());
for msg_bytes in clogging_messages {
for msg_bytes in clogging_messages.take(5) {
if let Some(msg) = <Message<B> as Decode>::decode(&mut Cursor::new(msg_bytes)) {
debug!(target: "sync", "{:?}", msg);
} else {