Prepare for rust stable 1.60 (#11138)

* Prepare for rust stable 1.59

Besides preparing the UI tests this also adds a new script update-rust-stable.sh script for
simplifying the update of a rust stable version. This script will run all UI tests for the new
rust stable version and updating the expected output.

* Ensure we run the UI tests in CI

* use staging ci image

* More test updates

* Unignore test (#11097)

* empty commit for pipeline rerun

* empty commit for pipeline rerun

* Try to make clippy happy

* More clippy fixes

* FMT

* ci image production

Co-authored-by: alvicsam <alvicsam@gmail.com>
Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com>
This commit is contained in:
Bastian Köcher
2022-04-11 11:21:54 +02:00
committed by GitHub
parent d20a10dee3
commit f517e57f67
36 changed files with 330 additions and 369 deletions
+1 -1
View File
@@ -572,7 +572,7 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkWorker<B, H> {
.collect();
let endpoint = if let Some(e) =
swarm.behaviour_mut().node(peer_id).map(|i| i.endpoint()).flatten()
swarm.behaviour_mut().node(peer_id).and_then(|i| i.endpoint())
{
e.clone().into()
} else {
+2 -2
View File
@@ -74,11 +74,11 @@ where
H: ExHashT,
{
fn set_authorized_peers(&self, peers: HashSet<PeerId>) {
self.set_authorized_peers(peers)
NetworkService::set_authorized_peers(self, peers)
}
fn set_authorized_only(&self, reserved_only: bool) {
self.set_authorized_only(reserved_only)
NetworkService::set_authorized_only(self, reserved_only)
}
}
@@ -91,28 +91,26 @@ where
B: backend::Backend<Block>,
{
let spec = CallExecutor::runtime_version(self, id)?;
let code = if let Some(d) = self
.wasm_override
.as_ref()
.as_ref()
.map(|o| o.get(&spec.spec_version, onchain_code.heap_pages, &spec.spec_name))
.flatten()
{
log::debug!(target: "wasm_overrides", "using WASM override for block {}", id);
d
} else if let Some(s) =
self.wasm_substitutes.get(spec.spec_version, onchain_code.heap_pages, id)
{
log::debug!(target: "wasm_substitutes", "Using WASM substitute for block {:?}", id);
s
} else {
log::debug!(
target: "wasm_overrides",
"No WASM override available for block {}, using onchain code",
id
);
onchain_code
};
let code =
if let Some(d) =
self.wasm_override.as_ref().as_ref().and_then(|o| {
o.get(&spec.spec_version, onchain_code.heap_pages, &spec.spec_name)
}) {
log::debug!(target: "wasm_overrides", "using WASM override for block {}", id);
d
} else if let Some(s) =
self.wasm_substitutes.get(spec.spec_version, onchain_code.heap_pages, id)
{
log::debug!(target: "wasm_substitutes", "Using WASM substitute for block {:?}", id);
s
} else {
log::debug!(
target: "wasm_overrides",
"No WASM override available for block {}, using onchain code",
id
);
onchain_code
};
Ok(code)
}
@@ -186,7 +186,7 @@ impl WasmOverride {
for entry in fs::read_dir(dir).map_err(handle_err)? {
let entry = entry.map_err(handle_err)?;
let path = entry.path();
match path.extension().map(|e| e.to_str()).flatten() {
match path.extension().and_then(|e| e.to_str()) {
Some("wasm") => {
let code = fs::read(&path).map_err(handle_err)?;
let code_hash = make_hash(&code);