mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 00:31:07 +00:00
Display has_api_with results if invalid version of Offchain Workers is detected. (#4749)
* Display error message when checking has_api. * Cargo.lock.
This commit is contained in:
committed by
Bastian Köcher
parent
4c63766e41
commit
e7df428274
@@ -107,7 +107,11 @@ impl<Client, Storage, Block> OffchainWorkers<
|
||||
let version = match (has_api_v1, has_api_v2) {
|
||||
(_, Ok(true)) => 2,
|
||||
(Ok(true), _) => 1,
|
||||
_ => 0,
|
||||
err => {
|
||||
let help = "Consider turning off offchain workers if they are not part of your runtime.";
|
||||
log::error!("Unsupported Offchain Worker API version: {:?}. {}.", err, help);
|
||||
0
|
||||
}
|
||||
};
|
||||
debug!("Checking offchain workers at {:?}: version:{}", at, version);
|
||||
if version > 0 {
|
||||
@@ -140,8 +144,6 @@ impl<Client, Storage, Block> OffchainWorkers<
|
||||
});
|
||||
futures::future::Either::Left(runner.process())
|
||||
} else {
|
||||
let help = "Consider turning off offchain workers if they are not part of your runtime.";
|
||||
log::error!("Unsupported Offchain Worker API version: {}. {}", version, help);
|
||||
futures::future::Either::Right(futures::future::ready(()))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user