mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 14:11:09 +00:00
Print error message when collation failed (#1514)
This commit is contained in:
@@ -51,7 +51,6 @@ use std::time::Duration;
|
||||
use std::pin::Pin;
|
||||
|
||||
use futures::{future, Future, Stream, FutureExt, StreamExt};
|
||||
use log::warn;
|
||||
use sc_client_api::{StateBackend, BlockchainEvents};
|
||||
use sp_blockchain::HeaderBackend;
|
||||
use sp_core::Pair;
|
||||
@@ -357,8 +356,12 @@ fn build_collator_service<P, C, R, Extrinsic>(
|
||||
|
||||
let silenced = deadlined
|
||||
.map(|either| {
|
||||
if let future::Either::Right(_) = either {
|
||||
warn!("Collation failure: timeout");
|
||||
match either {
|
||||
future::Either::Right(_) => log::warn!("Collation failure: timeout"),
|
||||
future::Either::Left((Err(e), _)) => {
|
||||
log::error!("Collation failed: {:?}", e)
|
||||
}
|
||||
future::Either::Left((Ok(()), _)) => {},
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user