mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 08:37:56 +00:00
Prepare UI tests for rust 1.55 (#9637)
* Prepare UI tests for rust 1.54 * Delete wrong_page.stderr * CI: run with a staging CI image * Revert "CI: run with a staging CI image" This reverts commit 66f5b00d14b50fd9d8fbf773f7e884f380697591. * CI: debug, again * LOG_TARGET is only used in std * Remove unnecessary unsafe * Fixes * Use correct rustc locally * FMT * Compile with benchmarking * Review feedback * Some ui tests * I know... * Fix wasm tests Co-authored-by: Denis P <denis.pisarev@parity.io> Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -21,15 +21,7 @@ mod changeset;
|
||||
mod offchain;
|
||||
|
||||
use self::changeset::OverlayedChangeSet;
|
||||
use crate::{backend::Backend, stats::StateMachineStats};
|
||||
pub use offchain::OffchainOverlayedChanges;
|
||||
use sp_std::{
|
||||
any::{Any, TypeId},
|
||||
boxed::Box,
|
||||
vec::Vec,
|
||||
};
|
||||
|
||||
use crate::{changes_trie::BlockNumber, DefaultError};
|
||||
use crate::{backend::Backend, changes_trie::BlockNumber, stats::StateMachineStats, DefaultError};
|
||||
#[cfg(feature = "std")]
|
||||
use crate::{
|
||||
changes_trie::{build_changes_trie, State as ChangesTrieState},
|
||||
@@ -37,16 +29,23 @@ use crate::{
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use hash_db::Hasher;
|
||||
pub use offchain::OffchainOverlayedChanges;
|
||||
use sp_core::{
|
||||
offchain::OffchainOverlayedChange,
|
||||
storage::{well_known_keys::EXTRINSIC_INDEX, ChildInfo},
|
||||
};
|
||||
#[cfg(feature = "std")]
|
||||
use sp_externalities::{Extension, Extensions};
|
||||
#[cfg(not(feature = "std"))]
|
||||
use sp_std::collections::btree_map::{BTreeMap as Map, Entry as MapEntry};
|
||||
use sp_std::collections::btree_set::BTreeSet;
|
||||
use sp_std::collections::btree_map::BTreeMap as Map;
|
||||
use sp_std::{collections::btree_set::BTreeSet, vec::Vec};
|
||||
#[cfg(feature = "std")]
|
||||
use std::collections::{hash_map::Entry as MapEntry, HashMap as Map};
|
||||
#[cfg(feature = "std")]
|
||||
use std::{
|
||||
any::{Any, TypeId},
|
||||
boxed::Box,
|
||||
};
|
||||
|
||||
pub use self::changeset::{AlreadyInRuntime, NoOpenTransaction, NotInRuntime, OverlayedValue};
|
||||
|
||||
@@ -581,6 +580,8 @@ impl OverlayedChanges {
|
||||
self.changes_trie_root(backend, changes_trie_state, parent_hash, false, &mut cache)
|
||||
.map_err(|_| "Failed to generate changes trie transaction")?;
|
||||
}
|
||||
#[cfg(not(feature = "std"))]
|
||||
let _ = parent_hash;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
let changes_trie_transaction = cache
|
||||
@@ -758,6 +759,7 @@ where
|
||||
|
||||
/// An overlayed extension is either a mutable reference
|
||||
/// or an owned extension.
|
||||
#[cfg(feature = "std")]
|
||||
pub enum OverlayedExtension<'a> {
|
||||
MutRef(&'a mut Box<dyn Extension>),
|
||||
Owned(Box<dyn Extension>),
|
||||
@@ -770,10 +772,12 @@ pub enum OverlayedExtension<'a> {
|
||||
/// as owned references. After the execution of a runtime function, we
|
||||
/// can safely drop this object while not having modified the original
|
||||
/// list.
|
||||
#[cfg(feature = "std")]
|
||||
pub struct OverlayedExtensions<'a> {
|
||||
extensions: Map<TypeId, OverlayedExtension<'a>>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
impl<'a> OverlayedExtensions<'a> {
|
||||
/// Create a new instance of overalyed extensions from the given extensions.
|
||||
pub fn new(extensions: &'a mut Extensions) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user