mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 01:11:10 +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:
@@ -38,7 +38,9 @@ variables: &default-vars
|
||||
CARGO_INCREMENTAL: 0
|
||||
DOCKER_OS: "debian:stretch"
|
||||
ARCH: "x86_64"
|
||||
CI_IMAGE: "paritytech/ci-linux:production"
|
||||
# FIXME: revert me
|
||||
# CI_IMAGE: "paritytech/ci-linux:production"
|
||||
CI_IMAGE: "paritytech/ci-linux:staging-1.54.0"
|
||||
# FIXME set to release
|
||||
CARGO_UNLEASH_INSTALL_PARAMS: "--version 1.0.0-alpha.12"
|
||||
CARGO_UNLEASH_PKG_DEF: "--skip node node-* pallet-template pallet-example pallet-example-* subkey chain-spec-builder"
|
||||
|
||||
@@ -163,6 +163,7 @@ struct ClientSpec<E> {
|
||||
// Never used, left only for backward compatibility.
|
||||
consensus_engine: (),
|
||||
#[serde(skip_serializing)]
|
||||
#[allow(unused)]
|
||||
genesis: serde::de::IgnoredAny,
|
||||
/// Mapping from `block_hash` to `wasm_code`.
|
||||
///
|
||||
|
||||
@@ -1418,6 +1418,7 @@ mod qc {
|
||||
#[derive(Debug, Clone)]
|
||||
struct Node {
|
||||
hash: H256,
|
||||
#[allow(unused)]
|
||||
parent: H256,
|
||||
state: KeyMap,
|
||||
changes: KeySet,
|
||||
|
||||
@@ -91,7 +91,7 @@ sp_core::wasm_export_functions! {
|
||||
// This function dirties the **host** pages. I.e. we dirty 4KiB at a time and it will take
|
||||
// 16 writes to process a single wasm page.
|
||||
|
||||
let mut heap_ptr = heap_base as usize;
|
||||
let heap_ptr = heap_base as usize;
|
||||
|
||||
// Find the next wasm page boundary.
|
||||
let heap_ptr = round_up_to(heap_ptr, 65536);
|
||||
@@ -234,7 +234,7 @@ sp_core::wasm_export_functions! {
|
||||
match instance.get_global_val("test_global") {
|
||||
Some(sp_sandbox::Value::I64(val)) => val,
|
||||
None => 30,
|
||||
val => 40,
|
||||
_ => 40,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ sp_core::wasm_export_functions! {
|
||||
// It is expected that the given pointer is not allocated.
|
||||
fn check_and_set_in_heap(heap_base: u32, offset: u32) {
|
||||
let test_message = b"Hello invalid heap memory";
|
||||
let ptr = unsafe { (heap_base + offset) as *mut u8 };
|
||||
let ptr = (heap_base + offset) as *mut u8;
|
||||
|
||||
let message_slice = unsafe { sp_std::slice::from_raw_parts_mut(ptr, test_message.len()) };
|
||||
|
||||
|
||||
@@ -101,8 +101,6 @@ pub struct WasmExecutor {
|
||||
host_functions: Arc<Vec<&'static dyn Function>>,
|
||||
/// WASM runtime cache.
|
||||
cache: Arc<RuntimeCache>,
|
||||
/// The size of the instances cache.
|
||||
max_runtime_instances: usize,
|
||||
/// The path to a directory which the executor can leverage for a file cache, e.g. put there
|
||||
/// compiled artifacts.
|
||||
cache_path: Option<PathBuf>,
|
||||
@@ -138,7 +136,6 @@ impl WasmExecutor {
|
||||
default_heap_pages: default_heap_pages.unwrap_or(DEFAULT_HEAP_PAGES),
|
||||
host_functions: Arc::new(host_functions),
|
||||
cache: Arc::new(RuntimeCache::new(max_runtime_instances, cache_path.clone())),
|
||||
max_runtime_instances,
|
||||
cache_path,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,10 +143,10 @@ pub struct RemoteReadResponse {
|
||||
/// Announcement summary used for debug logging.
|
||||
#[derive(Debug)]
|
||||
pub struct AnnouncementSummary<H: HeaderT> {
|
||||
block_hash: H::Hash,
|
||||
number: H::Number,
|
||||
parent_hash: H::Hash,
|
||||
state: Option<BlockState>,
|
||||
pub block_hash: H::Hash,
|
||||
pub number: H::Number,
|
||||
pub parent_hash: H::Hash,
|
||||
pub state: Option<BlockState>,
|
||||
}
|
||||
|
||||
impl<H: HeaderT> generic::BlockAnnounce<H> {
|
||||
|
||||
@@ -41,7 +41,7 @@ use std::{cell::RefCell, panic::UnwindSafe, result, sync::Arc};
|
||||
pub struct LocalCallExecutor<Block: BlockT, B, E> {
|
||||
backend: Arc<B>,
|
||||
executor: E,
|
||||
wasm_override: Option<WasmOverride<E>>,
|
||||
wasm_override: Option<WasmOverride>,
|
||||
wasm_substitutes: WasmSubstitutes<Block, E, B>,
|
||||
spawn_handle: Box<dyn SpawnNamed>,
|
||||
client_config: ClientConfig<Block>,
|
||||
@@ -62,7 +62,7 @@ where
|
||||
let wasm_override = client_config
|
||||
.wasm_runtime_overrides
|
||||
.as_ref()
|
||||
.map(|p| WasmOverride::new(p.clone(), executor.clone()))
|
||||
.map(|p| WasmOverride::new(p.clone(), &executor))
|
||||
.transpose()?;
|
||||
|
||||
let wasm_substitutes = WasmSubstitutes::new(
|
||||
@@ -371,7 +371,7 @@ mod tests {
|
||||
1,
|
||||
);
|
||||
|
||||
let overrides = crate::client::wasm_override::dummy_overrides(&executor);
|
||||
let overrides = crate::client::wasm_override::dummy_overrides();
|
||||
let onchain_code = WrappedRuntimeCode(substrate_test_runtime::wasm_binary_unwrap().into());
|
||||
let onchain_code = RuntimeCode {
|
||||
code_fetcher: &onchain_code,
|
||||
|
||||
@@ -104,22 +104,19 @@ impl From<WasmOverrideError> for sp_blockchain::Error {
|
||||
/// Scrapes WASM from a folder and returns WASM from that folder
|
||||
/// if the runtime spec version matches.
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct WasmOverride<E> {
|
||||
pub struct WasmOverride {
|
||||
// Map of runtime spec version -> Wasm Blob
|
||||
overrides: HashMap<u32, WasmBlob>,
|
||||
executor: E,
|
||||
}
|
||||
|
||||
impl<E> WasmOverride<E>
|
||||
where
|
||||
E: RuntimeVersionOf + Clone + 'static,
|
||||
{
|
||||
pub fn new<P>(path: P, executor: E) -> Result<Self>
|
||||
impl WasmOverride {
|
||||
pub fn new<P, E>(path: P, executor: &E) -> Result<Self>
|
||||
where
|
||||
P: AsRef<Path>,
|
||||
E: RuntimeVersionOf,
|
||||
{
|
||||
let overrides = Self::scrape_overrides(path.as_ref(), &executor)?;
|
||||
Ok(Self { overrides, executor })
|
||||
let overrides = Self::scrape_overrides(path.as_ref(), executor)?;
|
||||
Ok(Self { overrides })
|
||||
}
|
||||
|
||||
/// Gets an override by it's runtime spec version.
|
||||
@@ -131,7 +128,10 @@ where
|
||||
|
||||
/// Scrapes a folder for WASM runtimes.
|
||||
/// Returns a hashmap of the runtime version and wasm runtime code.
|
||||
fn scrape_overrides(dir: &Path, executor: &E) -> Result<HashMap<u32, WasmBlob>> {
|
||||
fn scrape_overrides<E>(dir: &Path, executor: &E) -> Result<HashMap<u32, WasmBlob>>
|
||||
where
|
||||
E: RuntimeVersionOf,
|
||||
{
|
||||
let handle_err = |e: std::io::Error| -> sp_blockchain::Error {
|
||||
WasmOverrideError::Io(dir.to_owned(), e).into()
|
||||
};
|
||||
@@ -176,11 +176,14 @@ where
|
||||
Ok(overrides)
|
||||
}
|
||||
|
||||
fn runtime_version(
|
||||
fn runtime_version<E>(
|
||||
executor: &E,
|
||||
code: &WasmBlob,
|
||||
heap_pages: Option<u64>,
|
||||
) -> Result<RuntimeVersion> {
|
||||
) -> Result<RuntimeVersion>
|
||||
where
|
||||
E: RuntimeVersionOf,
|
||||
{
|
||||
let mut ext = BasicExternalities::default();
|
||||
executor
|
||||
.runtime_version(&mut ext, &code.runtime_code(heap_pages))
|
||||
@@ -190,15 +193,12 @@ where
|
||||
|
||||
/// Returns a WasmOverride struct filled with dummy data for testing.
|
||||
#[cfg(test)]
|
||||
pub fn dummy_overrides<E>(executor: &E) -> WasmOverride<E>
|
||||
where
|
||||
E: RuntimeVersionOf + Clone + 'static,
|
||||
{
|
||||
pub fn dummy_overrides() -> WasmOverride {
|
||||
let mut overrides = HashMap::new();
|
||||
overrides.insert(0, WasmBlob::new(vec![0, 0, 0, 0, 0, 0, 0, 0]));
|
||||
overrides.insert(1, WasmBlob::new(vec![1, 1, 1, 1, 1, 1, 1, 1]));
|
||||
overrides.insert(2, WasmBlob::new(vec![2, 2, 2, 2, 2, 2, 2, 2]));
|
||||
WasmOverride { overrides, executor: executor.clone() }
|
||||
WasmOverride { overrides }
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -2241,7 +2241,7 @@ benchmarks! {
|
||||
);
|
||||
}
|
||||
#[cfg(not(feature = "std"))]
|
||||
return Err("Run this bench with a native runtime in order to see the schedule.".into());
|
||||
Err("Run this bench with a native runtime in order to see the schedule.")?;
|
||||
}: {}
|
||||
|
||||
// Execute one erc20 transfer using the ink! erc20 example contract.
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
|
||||
//! Benchmarks for the GRANDPA pallet.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use super::{Pallet as Grandpa, *};
|
||||
use frame_benchmarking::benchmarks;
|
||||
use frame_system::RawOrigin;
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
|
||||
//! Benchmarks for the MMR pallet.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use crate::*;
|
||||
use frame_benchmarking::{benchmarks_instance_pallet, impl_benchmark_test_suite};
|
||||
use frame_support::traits::OnInitialize;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
use crate::{storage::StorageDecodeLength, traits::Get};
|
||||
use codec::{Decode, Encode, MaxEncodedLen};
|
||||
use sp_std::{
|
||||
borrow::Borrow, collections::btree_map::BTreeMap, convert::TryFrom, fmt, marker::PhantomData,
|
||||
borrow::Borrow, collections::btree_map::BTreeMap, convert::TryFrom, marker::PhantomData,
|
||||
ops::Deref,
|
||||
};
|
||||
|
||||
@@ -173,12 +173,12 @@ where
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
impl<K, V, S> fmt::Debug for BoundedBTreeMap<K, V, S>
|
||||
impl<K, V, S> std::fmt::Debug for BoundedBTreeMap<K, V, S>
|
||||
where
|
||||
BTreeMap<K, V>: fmt::Debug,
|
||||
BTreeMap<K, V>: std::fmt::Debug,
|
||||
S: Get<u32>,
|
||||
{
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_tuple("BoundedBTreeMap").field(&self.0).field(&Self::bound()).finish()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
use crate::{storage::StorageDecodeLength, traits::Get};
|
||||
use codec::{Decode, Encode, MaxEncodedLen};
|
||||
use sp_std::{
|
||||
borrow::Borrow, collections::btree_set::BTreeSet, convert::TryFrom, fmt, marker::PhantomData,
|
||||
borrow::Borrow, collections::btree_set::BTreeSet, convert::TryFrom, marker::PhantomData,
|
||||
ops::Deref,
|
||||
};
|
||||
|
||||
@@ -157,12 +157,12 @@ where
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
impl<T, S> fmt::Debug for BoundedBTreeSet<T, S>
|
||||
impl<T, S> std::fmt::Debug for BoundedBTreeSet<T, S>
|
||||
where
|
||||
BTreeSet<T>: fmt::Debug,
|
||||
BTreeSet<T>: std::fmt::Debug,
|
||||
S: Get<u32>,
|
||||
{
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_tuple("BoundedBTreeSet").field(&self.0).field(&Self::bound()).finish()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ use core::{
|
||||
ops::{Deref, Index, IndexMut},
|
||||
slice::SliceIndex,
|
||||
};
|
||||
use sp_std::{convert::TryFrom, fmt, marker::PhantomData, prelude::*};
|
||||
use sp_std::{convert::TryFrom, marker::PhantomData, prelude::*};
|
||||
|
||||
/// A bounded vector.
|
||||
///
|
||||
@@ -201,12 +201,12 @@ impl<T, S> Default for BoundedVec<T, S> {
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
impl<T, S> fmt::Debug for BoundedVec<T, S>
|
||||
impl<T, S> std::fmt::Debug for BoundedVec<T, S>
|
||||
where
|
||||
T: fmt::Debug,
|
||||
T: std::fmt::Debug,
|
||||
S: Get<u32>,
|
||||
{
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_tuple("BoundedVec").field(&self.0).field(&Self::bound()).finish()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ use core::{
|
||||
ops::{Deref, Index, IndexMut},
|
||||
slice::SliceIndex,
|
||||
};
|
||||
use sp_std::{convert::TryFrom, fmt, marker::PhantomData, prelude::*};
|
||||
use sp_std::{convert::TryFrom, marker::PhantomData, prelude::*};
|
||||
|
||||
/// A weakly bounded vector.
|
||||
///
|
||||
@@ -171,12 +171,12 @@ impl<T, S> Default for WeakBoundedVec<T, S> {
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
impl<T, S> fmt::Debug for WeakBoundedVec<T, S>
|
||||
impl<T, S> std::fmt::Debug for WeakBoundedVec<T, S>
|
||||
where
|
||||
T: fmt::Debug,
|
||||
T: std::fmt::Debug,
|
||||
S: Get<u32>,
|
||||
{
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_tuple("WeakBoundedVec").field(&self.0).field(&Self::bound()).finish()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
use impl_trait_for_tuples::impl_for_tuples;
|
||||
use sp_arithmetic::traits::Saturating;
|
||||
use sp_runtime::traits::{AtLeast32BitUnsigned, MaybeSerializeDeserialize};
|
||||
use sp_runtime::traits::AtLeast32BitUnsigned;
|
||||
|
||||
/// The block initialization trait.
|
||||
///
|
||||
@@ -294,7 +294,7 @@ pub trait Hooks<BlockNumber> {
|
||||
/// A trait to define the build function of a genesis config, T and I are placeholder for pallet
|
||||
/// trait and pallet instance.
|
||||
#[cfg(feature = "std")]
|
||||
pub trait GenesisBuild<T, I = ()>: Default + MaybeSerializeDeserialize {
|
||||
pub trait GenesisBuild<T, I = ()>: Default + sp_runtime::traits::MaybeSerializeDeserialize {
|
||||
/// The build function is called within an externalities allowing storage APIs.
|
||||
/// Thus one can write to storage using regular pallet storages.
|
||||
fn build(&self);
|
||||
|
||||
+4
-4
@@ -10,7 +10,7 @@ error: `Pallet` does not have the std feature enabled, this will cause the `test
|
||||
22 | | }
|
||||
| |_^
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `test_pallet::__substrate_genesis_config_check::is_std_enabled_for_genesis` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
--> $DIR/no_std_genesis_config.rs:19:11
|
||||
@@ -30,7 +30,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
22 | | }
|
||||
| |_^ not found in `system`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing this enum
|
||||
|
|
||||
1 | use frame_system::RawOrigin;
|
||||
@@ -48,7 +48,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
22 | | }
|
||||
| |_^ not found in `system`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing one of these items
|
||||
|
|
||||
1 | use frame_support_test::Pallet;
|
||||
@@ -70,7 +70,7 @@ error[E0412]: cannot find type `GenesisConfig` in crate `test_pallet`
|
||||
22 | | }
|
||||
| |_^ not found in `test_pallet`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing this struct
|
||||
|
|
||||
1 | use frame_system::GenesisConfig;
|
||||
|
||||
@@ -13,7 +13,7 @@ error: `Pallet` does not have #[pallet::call] defined, perhaps you should remove
|
||||
31 | | }
|
||||
| |_- in this macro invocation
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `pallet::__substrate_call_check::is_call_part_defined` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
--> $DIR/undefined_call_part.rs:28:11
|
||||
@@ -33,7 +33,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
31 | | }
|
||||
| |_^ not found in `system`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing this enum
|
||||
|
|
||||
1 | use frame_system::RawOrigin;
|
||||
@@ -51,7 +51,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
31 | | }
|
||||
| |_^ not found in `system`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing one of these items
|
||||
|
|
||||
1 | use crate::pallet::Pallet;
|
||||
|
||||
@@ -13,7 +13,7 @@ error: `Pallet` does not have #[pallet::event] defined, perhaps you should remov
|
||||
31 | | }
|
||||
| |_- in this macro invocation
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `pallet::__substrate_event_check::is_event_part_defined` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
--> $DIR/undefined_event_part.rs:28:11
|
||||
@@ -33,7 +33,7 @@ error[E0412]: cannot find type `Event` in module `pallet`
|
||||
31 | | }
|
||||
| |_^ not found in `pallet`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing this enum
|
||||
|
|
||||
1 | use frame_system::Event;
|
||||
@@ -51,7 +51,7 @@ error[E0412]: cannot find type `Event` in module `pallet`
|
||||
31 | | }
|
||||
| |_^ not found in `pallet`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing one of these items
|
||||
|
|
||||
1 | use crate::Event;
|
||||
@@ -71,7 +71,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
31 | | }
|
||||
| |_^ not found in `system`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing this enum
|
||||
|
|
||||
1 | use frame_system::RawOrigin;
|
||||
@@ -89,7 +89,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
31 | | }
|
||||
| |_^ not found in `system`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing one of these items
|
||||
|
|
||||
1 | use crate::pallet::Pallet;
|
||||
|
||||
+4
-4
@@ -13,7 +13,7 @@ error: `Pallet` does not have #[pallet::genesis_config] defined, perhaps you sho
|
||||
31 | | }
|
||||
| |_- in this macro invocation
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `pallet::__substrate_genesis_config_check::is_genesis_config_defined` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
--> $DIR/undefined_genesis_config_part.rs:28:17
|
||||
@@ -33,7 +33,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
31 | | }
|
||||
| |_^ not found in `system`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing this enum
|
||||
|
|
||||
1 | use frame_system::RawOrigin;
|
||||
@@ -51,7 +51,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
31 | | }
|
||||
| |_^ not found in `system`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing one of these items
|
||||
|
|
||||
1 | use crate::pallet::Pallet;
|
||||
@@ -75,7 +75,7 @@ error[E0412]: cannot find type `GenesisConfig` in module `pallet`
|
||||
31 | | }
|
||||
| |_^ not found in `pallet`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing this struct
|
||||
|
|
||||
1 | use frame_system::GenesisConfig;
|
||||
|
||||
+3
-3
@@ -13,7 +13,7 @@ error: `Pallet` does not have #[pallet::inherent] defined, perhaps you should re
|
||||
31 | | }
|
||||
| |_- in this macro invocation
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `pallet::__substrate_inherent_check::is_inherent_part_defined` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
--> $DIR/undefined_inherent_part.rs:28:11
|
||||
@@ -33,7 +33,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
31 | | }
|
||||
| |_^ not found in `system`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing this enum
|
||||
|
|
||||
1 | use frame_system::RawOrigin;
|
||||
@@ -51,7 +51,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
31 | | }
|
||||
| |_^ not found in `system`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing one of these items
|
||||
|
|
||||
1 | use crate::pallet::Pallet;
|
||||
|
||||
+5
-5
@@ -13,7 +13,7 @@ error: `Pallet` does not have #[pallet::origin] defined, perhaps you should remo
|
||||
31 | | }
|
||||
| |_- in this macro invocation
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `pallet::__substrate_origin_check::is_origin_part_defined` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
--> $DIR/undefined_origin_part.rs:28:11
|
||||
@@ -33,7 +33,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
31 | | }
|
||||
| |_^ not found in `system`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing this enum
|
||||
|
|
||||
1 | use frame_system::RawOrigin;
|
||||
@@ -51,7 +51,7 @@ error[E0412]: cannot find type `Origin` in module `pallet`
|
||||
31 | | }
|
||||
| |_^ not found in `pallet`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing this type alias
|
||||
|
|
||||
1 | use frame_system::Origin;
|
||||
@@ -69,7 +69,7 @@ error[E0412]: cannot find type `Origin` in module `pallet`
|
||||
31 | | }
|
||||
| |_^ not found in `pallet`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing one of these items
|
||||
|
|
||||
1 | use crate::Origin;
|
||||
@@ -89,7 +89,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
31 | | }
|
||||
| |_^ not found in `system`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing one of these items
|
||||
|
|
||||
1 | use crate::pallet::Pallet;
|
||||
|
||||
+3
-3
@@ -13,7 +13,7 @@ error: `Pallet` does not have #[pallet::validate_unsigned] defined, perhaps you
|
||||
31 | | }
|
||||
| |_- in this macro invocation
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `pallet::__substrate_validate_unsigned_check::is_validate_unsigned_part_defined` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
--> $DIR/undefined_validate_unsigned_part.rs:28:11
|
||||
@@ -33,7 +33,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
31 | | }
|
||||
| |_^ not found in `system`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing this enum
|
||||
|
|
||||
1 | use frame_system::RawOrigin;
|
||||
@@ -51,7 +51,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `system`
|
||||
31 | | }
|
||||
| |_^ not found in `system`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing one of these items
|
||||
|
|
||||
1 | use crate::pallet::Pallet;
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ error: `integrity_test` can only be passed once as input.
|
||||
7 | | }
|
||||
| |_^
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `$crate::decl_module` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0601]: `main` function not found in crate `$CRATE`
|
||||
--> $DIR/reserved_keyword_two_times_integrity_test.rs:1:1
|
||||
|
||||
+2
@@ -9,3 +9,5 @@ frame_support::decl_module! {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
+1
-13
@@ -10,16 +10,4 @@ error: `on_initialize` can only be passed once as input.
|
||||
11 | | }
|
||||
| |_^
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0601]: `main` function not found in crate `$CRATE`
|
||||
--> $DIR/reserved_keyword_two_times_on_initialize.rs:1:1
|
||||
|
|
||||
1 | / frame_support::decl_module! {
|
||||
2 | | pub struct Module<T: Config> for enum Call where origin: T::Origin, system=self {
|
||||
3 | | fn on_initialize() -> Weight {
|
||||
4 | | 0
|
||||
... |
|
||||
10 | | }
|
||||
11 | | }
|
||||
| |_^ consider adding a `main` function to `$DIR/tests/decl_module_ui/reserved_keyword_two_times_on_initialize.rs`
|
||||
= note: this error originates in the macro `$crate::decl_module` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
error[E0277]: the trait bound `<T as Config>::C: Clone` is not satisfied
|
||||
--> $DIR/clone.rs:7:2
|
||||
|
|
||||
7 | c: T::C,
|
||||
| ^ the trait `Clone` is not implemented for `<T as Config>::C`
|
||||
|
|
||||
= note: required by `clone`
|
||||
--> $DIR/clone.rs:7:2
|
||||
|
|
||||
7 | c: T::C,
|
||||
| ^ the trait `Clone` is not implemented for `<T as Config>::C`
|
||||
|
|
||||
note: required by `clone`
|
||||
--> $DIR/clone.rs:121:5
|
||||
|
|
||||
121 | fn clone(&self) -> Self;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
error[E0277]: the trait bound `<T as Config>::C: std::default::Default` is not satisfied
|
||||
--> $DIR/default.rs:7:2
|
||||
|
|
||||
7 | c: T::C,
|
||||
| ^ the trait `std::default::Default` is not implemented for `<T as Config>::C`
|
||||
|
|
||||
= note: required by `std::default::Default::default`
|
||||
--> $DIR/default.rs:7:2
|
||||
|
|
||||
7 | c: T::C,
|
||||
| ^ the trait `std::default::Default` is not implemented for `<T as Config>::C`
|
||||
|
|
||||
note: required by `std::default::Default::default`
|
||||
--> $DIR/default.rs:116:5
|
||||
|
|
||||
116 | fn default() -> Self;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -9,12 +9,16 @@ error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
|
||||
= note: required for the cast to the object type `dyn std::fmt::Debug`
|
||||
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
|
||||
--> $DIR/call_argument_invalid_bound.rs:20:36
|
||||
|
|
||||
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
|
||||
= note: required by `clone`
|
||||
--> $DIR/call_argument_invalid_bound.rs:20:36
|
||||
|
|
||||
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
|
||||
note: required by `clone`
|
||||
--> $DIR/clone.rs:121:5
|
||||
|
|
||||
121 | fn clone(&self) -> Self;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0369]: binary operation `==` cannot be applied to type `&<T as pallet::Config>::Bar`
|
||||
--> $DIR/call_argument_invalid_bound.rs:20:36
|
||||
|
||||
@@ -9,12 +9,16 @@ error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
|
||||
= note: required for the cast to the object type `dyn std::fmt::Debug`
|
||||
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
|
||||
--> $DIR/call_argument_invalid_bound_2.rs:20:36
|
||||
|
|
||||
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
|
||||
= note: required by `clone`
|
||||
--> $DIR/call_argument_invalid_bound_2.rs:20:36
|
||||
|
|
||||
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
|
||||
note: required by `clone`
|
||||
--> $DIR/clone.rs:121:5
|
||||
|
|
||||
121 | fn clone(&self) -> Self;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0369]: binary operation `==` cannot be applied to type `&<T as pallet::Config>::Bar`
|
||||
--> $DIR/call_argument_invalid_bound_2.rs:20:36
|
||||
|
||||
@@ -5,17 +5,21 @@ error[E0277]: `Bar` doesn't implement `std::fmt::Debug`
|
||||
| ^^^ `Bar` cannot be formatted using `{:?}`
|
||||
|
|
||||
= help: the trait `std::fmt::Debug` is not implemented for `Bar`
|
||||
= note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug`
|
||||
= note: add `#[derive(Debug)]` to `Bar` or manually `impl std::fmt::Debug for Bar`
|
||||
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&Bar`
|
||||
= note: required for the cast to the object type `dyn std::fmt::Debug`
|
||||
|
||||
error[E0277]: the trait bound `Bar: Clone` is not satisfied
|
||||
--> $DIR/call_argument_invalid_bound_3.rs:22:36
|
||||
|
|
||||
22 | pub fn foo(origin: OriginFor<T>, bar: Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^ the trait `Clone` is not implemented for `Bar`
|
||||
|
|
||||
= note: required by `clone`
|
||||
--> $DIR/call_argument_invalid_bound_3.rs:22:36
|
||||
|
|
||||
22 | pub fn foo(origin: OriginFor<T>, bar: Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^ the trait `Clone` is not implemented for `Bar`
|
||||
|
|
||||
note: required by `clone`
|
||||
--> $DIR/clone.rs:121:5
|
||||
|
|
||||
121 | fn clone(&self) -> Self;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0369]: binary operation `==` cannot be applied to type `&Bar`
|
||||
--> $DIR/call_argument_invalid_bound_3.rs:22:36
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
|
||||
--> $DIR/event_field_not_member.rs:23:7
|
||||
|
|
||||
23 | B { b: T::Bar },
|
||||
| ^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
|
||||
= note: required by `clone`
|
||||
--> $DIR/event_field_not_member.rs:23:7
|
||||
|
|
||||
23 | B { b: T::Bar },
|
||||
| ^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
|
||||
note: required by `clone`
|
||||
--> $DIR/clone.rs:121:5
|
||||
|
|
||||
121 | fn clone(&self) -> Self;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0369]: binary operation `==` cannot be applied to type `&<T as pallet::Config>::Bar`
|
||||
--> $DIR/event_field_not_member.rs:23:7
|
||||
|
||||
@@ -4,4 +4,4 @@ error: Invalid usage of Event, `Config` contains no associated type `Event`, but
|
||||
1 | #[frame_support::pallet]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -6,5 +6,5 @@ error[E0277]: the trait bound `pallet::GenesisConfig: std::default::Default` is
|
||||
|
|
||||
::: $WORKSPACE/frame/support/src/traits/hooks.rs
|
||||
|
|
||||
| pub trait GenesisBuild<T, I = ()>: Default + MaybeSerializeDeserialize {
|
||||
| pub trait GenesisBuild<T, I = ()>: Default + sp_runtime::traits::MaybeSerializeDeserialize {
|
||||
| ------- required by this bound in `GenesisBuild`
|
||||
|
||||
@@ -10,4 +10,4 @@ error: expected `<`
|
||||
1 | #[frame_support::pallet]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -2,14 +2,14 @@ error[E0107]: missing generics for trait `Hooks`
|
||||
--> $DIR/hooks_invalid_item.rs:12:18
|
||||
|
|
||||
12 | impl<T: Config> Hooks for Pallet<T> {}
|
||||
| ^^^^^ expected 1 type argument
|
||||
| ^^^^^ expected 1 generic argument
|
||||
|
|
||||
note: trait defined here, with 1 type parameter: `BlockNumber`
|
||||
note: trait defined here, with 1 generic parameter: `BlockNumber`
|
||||
--> $DIR/hooks.rs:214:11
|
||||
|
|
||||
214 | pub trait Hooks<BlockNumber> {
|
||||
| ^^^^^ -----------
|
||||
help: use angle brackets to add missing type argument
|
||||
help: add missing generic argument
|
||||
|
|
||||
12 | impl<T: Config> Hooks<BlockNumber> for Pallet<T> {}
|
||||
| ^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
+85
-57
@@ -1,77 +1,105 @@
|
||||
error[E0277]: the trait bound `Bar: TypeInfo` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen.rs:20:12
|
||||
|
|
||||
20 | #[pallet::storage]
|
||||
| ^^^^^^^ the trait `TypeInfo` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `StaticTypeInfo` for `Bar`
|
||||
= note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
= note: required by `build_metadata`
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen.rs:20:12
|
||||
|
|
||||
20 | #[pallet::storage]
|
||||
| ^^^^^^^ the trait `TypeInfo` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `StaticTypeInfo` for `Bar`
|
||||
= note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
note: required by `build_metadata`
|
||||
--> $DIR/mod.rs:113:2
|
||||
|
|
||||
113 | fn build_metadata(doc: Vec<&'static str>, entries: &mut Vec<StorageEntryMetadata>);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `Bar: WrapperTypeDecode` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen.rs:20:12
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen.rs:20:12
|
||||
|
|
||||
20 | #[pallet::storage]
|
||||
| ^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `Decode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
note: required by `build_metadata`
|
||||
--> $DIR/mod.rs:113:2
|
||||
|
|
||||
113 | fn build_metadata(doc: Vec<&'static str>, entries: &mut Vec<StorageEntryMetadata>);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `Bar: EncodeLike` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen.rs:20:12
|
||||
|
|
||||
20 | #[pallet::storage]
|
||||
| ^^^^^^^ the trait `EncodeLike` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `FullEncode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
note: required by `build_metadata`
|
||||
--> $DIR/mod.rs:113:2
|
||||
|
|
||||
113 | fn build_metadata(doc: Vec<&'static str>, entries: &mut Vec<StorageEntryMetadata>);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `Bar: WrapperTypeEncode` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen.rs:20:12
|
||||
|
|
||||
20 | #[pallet::storage]
|
||||
| ^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `Encode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullEncode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
note: required by `build_metadata`
|
||||
--> $DIR/mod.rs:113:2
|
||||
|
|
||||
113 | fn build_metadata(doc: Vec<&'static str>, entries: &mut Vec<StorageEntryMetadata>);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `Bar: WrapperTypeDecode` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen.rs:9:12
|
||||
|
|
||||
20 | #[pallet::storage]
|
||||
| ^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `Bar`
|
||||
9 | #[pallet::pallet]
|
||||
| ^^^^^^ the trait `WrapperTypeDecode` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `Decode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
= note: required by `build_metadata`
|
||||
= note: required because of the requirements on the impl of `PartialStorageInfoTrait` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
note: required by `partial_storage_info`
|
||||
--> $DIR/storage.rs:88:2
|
||||
|
|
||||
88 | fn partial_storage_info() -> Vec<StorageInfo>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `Bar: EncodeLike` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen.rs:20:12
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen.rs:9:12
|
||||
|
|
||||
20 | #[pallet::storage]
|
||||
| ^^^^^^^ the trait `EncodeLike` is not implemented for `Bar`
|
||||
9 | #[pallet::pallet]
|
||||
| ^^^^^^ the trait `EncodeLike` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `FullEncode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
= note: required by `build_metadata`
|
||||
= note: required because of the requirements on the impl of `PartialStorageInfoTrait` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
note: required by `partial_storage_info`
|
||||
--> $DIR/storage.rs:88:2
|
||||
|
|
||||
88 | fn partial_storage_info() -> Vec<StorageInfo>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `Bar: WrapperTypeEncode` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen.rs:20:12
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen.rs:9:12
|
||||
|
|
||||
20 | #[pallet::storage]
|
||||
| ^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Bar`
|
||||
9 | #[pallet::pallet]
|
||||
| ^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `Encode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullEncode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
= note: required by `build_metadata`
|
||||
|
||||
error[E0277]: the trait bound `Bar: WrapperTypeDecode` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen.rs:9:12
|
||||
|
|
||||
9 | #[pallet::pallet]
|
||||
| ^^^^^^ the trait `WrapperTypeDecode` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `Decode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `PartialStorageInfoTrait` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
= note: required by `partial_storage_info`
|
||||
|
||||
error[E0277]: the trait bound `Bar: EncodeLike` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen.rs:9:12
|
||||
|
|
||||
9 | #[pallet::pallet]
|
||||
| ^^^^^^ the trait `EncodeLike` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `FullEncode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `PartialStorageInfoTrait` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
= note: required by `partial_storage_info`
|
||||
|
||||
error[E0277]: the trait bound `Bar: WrapperTypeEncode` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen.rs:9:12
|
||||
|
|
||||
9 | #[pallet::pallet]
|
||||
| ^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `Encode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullEncode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `PartialStorageInfoTrait` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
= note: required by `partial_storage_info`
|
||||
= note: required because of the requirements on the impl of `PartialStorageInfoTrait` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
note: required by `partial_storage_info`
|
||||
--> $DIR/storage.rs:88:2
|
||||
|
|
||||
88 | fn partial_storage_info() -> Vec<StorageInfo>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
+85
-57
@@ -1,77 +1,105 @@
|
||||
error[E0277]: the trait bound `Bar: TypeInfo` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen_unnamed.rs:20:12
|
||||
|
|
||||
20 | #[pallet::storage]
|
||||
| ^^^^^^^ the trait `TypeInfo` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `StaticTypeInfo` for `Bar`
|
||||
= note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
= note: required by `build_metadata`
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen_unnamed.rs:20:12
|
||||
|
|
||||
20 | #[pallet::storage]
|
||||
| ^^^^^^^ the trait `TypeInfo` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `StaticTypeInfo` for `Bar`
|
||||
= note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
note: required by `build_metadata`
|
||||
--> $DIR/mod.rs:113:2
|
||||
|
|
||||
113 | fn build_metadata(doc: Vec<&'static str>, entries: &mut Vec<StorageEntryMetadata>);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `Bar: WrapperTypeDecode` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen_unnamed.rs:20:12
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen_unnamed.rs:20:12
|
||||
|
|
||||
20 | #[pallet::storage]
|
||||
| ^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `Decode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
note: required by `build_metadata`
|
||||
--> $DIR/mod.rs:113:2
|
||||
|
|
||||
113 | fn build_metadata(doc: Vec<&'static str>, entries: &mut Vec<StorageEntryMetadata>);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `Bar: EncodeLike` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen_unnamed.rs:20:12
|
||||
|
|
||||
20 | #[pallet::storage]
|
||||
| ^^^^^^^ the trait `EncodeLike` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `FullEncode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
note: required by `build_metadata`
|
||||
--> $DIR/mod.rs:113:2
|
||||
|
|
||||
113 | fn build_metadata(doc: Vec<&'static str>, entries: &mut Vec<StorageEntryMetadata>);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `Bar: WrapperTypeEncode` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen_unnamed.rs:20:12
|
||||
|
|
||||
20 | #[pallet::storage]
|
||||
| ^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `Encode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullEncode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
note: required by `build_metadata`
|
||||
--> $DIR/mod.rs:113:2
|
||||
|
|
||||
113 | fn build_metadata(doc: Vec<&'static str>, entries: &mut Vec<StorageEntryMetadata>);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `Bar: WrapperTypeDecode` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen_unnamed.rs:9:12
|
||||
|
|
||||
20 | #[pallet::storage]
|
||||
| ^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `Bar`
|
||||
9 | #[pallet::pallet]
|
||||
| ^^^^^^ the trait `WrapperTypeDecode` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `Decode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
= note: required by `build_metadata`
|
||||
= note: required because of the requirements on the impl of `PartialStorageInfoTrait` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
note: required by `partial_storage_info`
|
||||
--> $DIR/storage.rs:88:2
|
||||
|
|
||||
88 | fn partial_storage_info() -> Vec<StorageInfo>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `Bar: EncodeLike` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen_unnamed.rs:20:12
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen_unnamed.rs:9:12
|
||||
|
|
||||
20 | #[pallet::storage]
|
||||
| ^^^^^^^ the trait `EncodeLike` is not implemented for `Bar`
|
||||
9 | #[pallet::pallet]
|
||||
| ^^^^^^ the trait `EncodeLike` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `FullEncode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
= note: required by `build_metadata`
|
||||
= note: required because of the requirements on the impl of `PartialStorageInfoTrait` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
note: required by `partial_storage_info`
|
||||
--> $DIR/storage.rs:88:2
|
||||
|
|
||||
88 | fn partial_storage_info() -> Vec<StorageInfo>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `Bar: WrapperTypeEncode` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen_unnamed.rs:20:12
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen_unnamed.rs:9:12
|
||||
|
|
||||
20 | #[pallet::storage]
|
||||
| ^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Bar`
|
||||
9 | #[pallet::pallet]
|
||||
| ^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `Encode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullEncode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
= note: required by `build_metadata`
|
||||
|
||||
error[E0277]: the trait bound `Bar: WrapperTypeDecode` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen_unnamed.rs:9:12
|
||||
|
|
||||
9 | #[pallet::pallet]
|
||||
| ^^^^^^ the trait `WrapperTypeDecode` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `Decode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `PartialStorageInfoTrait` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
= note: required by `partial_storage_info`
|
||||
|
||||
error[E0277]: the trait bound `Bar: EncodeLike` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen_unnamed.rs:9:12
|
||||
|
|
||||
9 | #[pallet::pallet]
|
||||
| ^^^^^^ the trait `EncodeLike` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `FullEncode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `PartialStorageInfoTrait` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
= note: required by `partial_storage_info`
|
||||
|
||||
error[E0277]: the trait bound `Bar: WrapperTypeEncode` is not satisfied
|
||||
--> $DIR/storage_ensure_span_are_ok_on_wrong_gen_unnamed.rs:9:12
|
||||
|
|
||||
9 | #[pallet::pallet]
|
||||
| ^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `Encode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullEncode` for `Bar`
|
||||
= note: required because of the requirements on the impl of `FullCodec` for `Bar`
|
||||
= note: required because of the requirements on the impl of `PartialStorageInfoTrait` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
= note: required by `partial_storage_info`
|
||||
= note: required because of the requirements on the impl of `PartialStorageInfoTrait` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
note: required by `partial_storage_info`
|
||||
--> $DIR/storage.rs:88:2
|
||||
|
|
||||
88 | fn partial_storage_info() -> Vec<StorageInfo>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -5,4 +5,8 @@ error[E0277]: the trait bound `Bar: MaxEncodedLen` is not satisfied
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ the trait `MaxEncodedLen` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `StorageInfoTrait` for `frame_support::pallet_prelude::StorageValue<_GeneratedPrefixForStorageFoo<T>, Bar>`
|
||||
= note: required by `storage_info`
|
||||
note: required by `storage_info`
|
||||
--> $DIR/storage.rs:71:2
|
||||
|
|
||||
71 | fn storage_info() -> Vec<StorageInfo>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -4,6 +4,10 @@ error[E0277]: the trait bound `Bar: MaxEncodedLen` is not satisfied
|
||||
10 | #[pallet::generate_storage_info]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ the trait `MaxEncodedLen` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `KeyGeneratorMaxEncodedLen` for `Key<frame_support::Twox64Concat, Bar>`
|
||||
= note: required because of the requirements on the impl of `StorageInfoTrait` for `frame_support::pallet_prelude::StorageNMap<_GeneratedPrefixForStorageFoo<T>, Key<frame_support::Twox64Concat, Bar>, u32>`
|
||||
= note: required by `storage_info`
|
||||
= note: required because of the requirements on the impl of `KeyGeneratorMaxEncodedLen` for `NMapKey<frame_support::Twox64Concat, Bar>`
|
||||
= note: required because of the requirements on the impl of `StorageInfoTrait` for `frame_support::pallet_prelude::StorageNMap<_GeneratedPrefixForStorageFoo<T>, NMapKey<frame_support::Twox64Concat, Bar>, u32>`
|
||||
note: required by `storage_info`
|
||||
--> $DIR/storage.rs:71:2
|
||||
|
|
||||
71 | fn storage_info() -> Vec<StorageInfo>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -4,7 +4,7 @@ error: Invalid call fn name: `on_finalize`, name is reserved and doesn't match e
|
||||
28 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `$crate::__check_reserved_fn_name` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: Invalid call fn name: `on_initialize`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword.
|
||||
--> $DIR/on_initialize.rs:28:1
|
||||
@@ -12,7 +12,7 @@ error: Invalid call fn name: `on_initialize`, name is reserved and doesn't match
|
||||
28 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `$crate::__check_reserved_fn_name` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: Invalid call fn name: `on_runtime_upgrade`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword.
|
||||
--> $DIR/on_initialize.rs:28:1
|
||||
@@ -20,7 +20,7 @@ error: Invalid call fn name: `on_runtime_upgrade`, name is reserved and doesn't
|
||||
28 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `$crate::__check_reserved_fn_name` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: Invalid call fn name: `offchain_worker`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword.
|
||||
--> $DIR/on_initialize.rs:28:1
|
||||
@@ -28,7 +28,7 @@ error: Invalid call fn name: `offchain_worker`, name is reserved and doesn't mat
|
||||
28 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `$crate::__check_reserved_fn_name` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: Invalid call fn name: `deposit_event`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword.
|
||||
--> $DIR/on_initialize.rs:28:1
|
||||
@@ -36,4 +36,4 @@ error: Invalid call fn name: `deposit_event`, name is reserved and doesn't match
|
||||
28 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `$crate::__check_reserved_fn_name` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -332,12 +332,7 @@ pub mod pallet {
|
||||
.unwrap(),
|
||||
);
|
||||
|
||||
// This is the minimum value of the multiplier. Make sure that if we collapse to this
|
||||
// value, we can recover with a reasonable amount of traffic. For this test we assert
|
||||
// that if we collapse to minimum, the trend will be positive with a weight value
|
||||
// which is 1% more than the target.
|
||||
let min_value = T::FeeMultiplierUpdate::min();
|
||||
let mut target = T::FeeMultiplierUpdate::target() *
|
||||
let target = T::FeeMultiplierUpdate::target() *
|
||||
T::BlockWeights::get().get(DispatchClass::Normal).max_total.expect(
|
||||
"Setting `max_total` for `Normal` dispatch class is not compatible with \
|
||||
`transaction-payment` pallet.",
|
||||
@@ -348,10 +343,17 @@ pub mod pallet {
|
||||
// this is most likely because in a test setup we set everything to ().
|
||||
return
|
||||
}
|
||||
target += addition;
|
||||
|
||||
#[cfg(any(feature = "std", test))]
|
||||
sp_io::TestExternalities::new_empty().execute_with(|| {
|
||||
// This is the minimum value of the multiplier. Make sure that if we collapse to
|
||||
// this value, we can recover with a reasonable amount of traffic. For this test we
|
||||
// assert that if we collapse to minimum, the trend will be positive with a weight
|
||||
// value which is 1% more than the target.
|
||||
let min_value = T::FeeMultiplierUpdate::min();
|
||||
|
||||
let target = target + addition;
|
||||
|
||||
<frame_system::Pallet<T>>::set_block_consumed_resources(target, 0);
|
||||
let next = T::FeeMultiplierUpdate::convert(min_value);
|
||||
assert!(
|
||||
|
||||
@@ -37,7 +37,7 @@ use sp_runtime::traits::{BlakeTwo256, Hash, One, Saturating, Zero};
|
||||
use sp_std::{prelude::*, result};
|
||||
use sp_transaction_storage_proof::{
|
||||
encode_index, random_chunk, InherentError, TransactionStorageProof, CHUNK_SIZE,
|
||||
DEFAULT_STORAGE_PERIOD, INHERENT_IDENTIFIER,
|
||||
INHERENT_IDENTIFIER,
|
||||
};
|
||||
|
||||
/// A type alias for the balance type from this pallet's point of view.
|
||||
@@ -380,7 +380,7 @@ pub mod pallet {
|
||||
Self {
|
||||
byte_fee: 10u32.into(),
|
||||
entry_fee: 1000u32.into(),
|
||||
storage_period: DEFAULT_STORAGE_PERIOD.into(),
|
||||
storage_period: sp_transaction_storage_proof::DEFAULT_STORAGE_PERIOD.into(),
|
||||
max_block_transactions: DEFAULT_MAX_BLOCK_TRANSACTIONS,
|
||||
max_transaction_size: DEFAULT_MAX_TRANSACTION_SIZE,
|
||||
}
|
||||
|
||||
@@ -4,4 +4,4 @@ error: No api implementation given!
|
||||
17 | sp_api::impl_runtime_apis! {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `sp_api::impl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -38,7 +38,7 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
|
||||
|
|
||||
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<u64>, Vec<_>) -> Result<_, _>`
|
||||
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<std::string::String>, Vec<_>) -> Result<_, _>`
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `sp_api::impl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/impl_incorrect_method_signature.rs:17:1
|
||||
@@ -52,7 +52,7 @@ error[E0308]: mismatched types
|
||||
33 | | }
|
||||
| |_^ expected `u64`, found struct `std::string::String`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `sp_api::impl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/impl_incorrect_method_signature.rs:19:11
|
||||
|
||||
@@ -10,4 +10,4 @@ error: `BlockId` needs to be taken by reference and not by value!
|
||||
19 | | }
|
||||
| |_^
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `sp_api::mock_impl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -36,7 +36,7 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
|
||||
|
|
||||
= note: expected fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<u64>, Vec<_>) -> Result<_, _>`
|
||||
found fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<()>, Vec<_>) -> Result<_, _>`
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `sp_api::mock_impl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0053]: method `Api_test2_runtime_api_impl` has an incompatible type for trait
|
||||
--> $DIR/mock_only_self_reference.rs:12:1
|
||||
@@ -64,4 +64,4 @@ error[E0053]: method `Api_test2_runtime_api_impl` has an incompatible type for t
|
||||
|
|
||||
= note: expected fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<u64>, Vec<_>) -> Result<_, _>`
|
||||
found fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<()>, Vec<_>) -> Result<_, _>`
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `sp_api::mock_impl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
+2
-2
@@ -38,7 +38,7 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
|
||||
|
|
||||
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<u64>, Vec<_>) -> Result<_, _>`
|
||||
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<&u64>, Vec<_>) -> Result<_, _>`
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `sp_api::impl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/type_reference_in_impl_runtime_apis_call.rs:17:1
|
||||
@@ -52,7 +52,7 @@ error[E0308]: mismatched types
|
||||
35 | | }
|
||||
| |_^ expected `u64`, found `&u64`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `sp_api::impl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/type_reference_in_impl_runtime_apis_call.rs:19:11
|
||||
|
||||
@@ -73,6 +73,7 @@ mod batch_verifier;
|
||||
#[cfg(feature = "std")]
|
||||
use batch_verifier::BatchVerifier;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
const LOG_TARGET: &str = "runtime::io";
|
||||
|
||||
/// Error verifying ECDSA signature
|
||||
@@ -1481,21 +1482,17 @@ mod allocator_impl {
|
||||
#[panic_handler]
|
||||
#[no_mangle]
|
||||
pub fn panic(info: &core::panic::PanicInfo) -> ! {
|
||||
unsafe {
|
||||
let message = sp_std::alloc::format!("{}", info);
|
||||
logging::log(LogLevel::Error, "runtime", message.as_bytes());
|
||||
core::arch::wasm32::unreachable();
|
||||
}
|
||||
let message = sp_std::alloc::format!("{}", info);
|
||||
logging::log(LogLevel::Error, "runtime", message.as_bytes());
|
||||
core::arch::wasm32::unreachable();
|
||||
}
|
||||
|
||||
/// A default OOM handler for WASM environment.
|
||||
#[cfg(all(not(feature = "disable_oom"), not(feature = "std")))]
|
||||
#[alloc_error_handler]
|
||||
pub fn oom(_: core::alloc::Layout) -> ! {
|
||||
unsafe {
|
||||
logging::log(LogLevel::Error, "runtime", b"Runtime memory exhausted. Aborting");
|
||||
core::arch::wasm32::unreachable();
|
||||
}
|
||||
logging::log(LogLevel::Error, "runtime", b"Runtime memory exhausted. Aborting");
|
||||
core::arch::wasm32::unreachable();
|
||||
}
|
||||
|
||||
/// Type alias for Externalities implementation used in tests.
|
||||
|
||||
@@ -4,4 +4,4 @@ error: `PassByEnum` only supports enums as input type.
|
||||
3 | #[derive(PassByEnum)]
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the derive macro `PassByEnum` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
+1
-1
@@ -4,4 +4,4 @@ error: `PassByEnum` only supports unit variants.
|
||||
3 | #[derive(PassByEnum)]
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the derive macro `PassByEnum` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
+1
-1
@@ -4,4 +4,4 @@ error: Only newtype/one field structs are supported by `PassByInner`!
|
||||
3 | #[derive(PassByInner)]
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the derive macro `PassByInner` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -1474,6 +1474,7 @@ macro_rules! impl_opaque_keys {
|
||||
|
||||
#[macro_export]
|
||||
#[cfg(not(feature = "std"))]
|
||||
#[doc(hidden)]
|
||||
macro_rules! impl_opaque_keys {
|
||||
{
|
||||
$( #[ $attr:meta ] )*
|
||||
|
||||
@@ -21,9 +21,9 @@ use crate::{
|
||||
trie_backend::TrieBackend, trie_backend_essence::TrieBackendStorage, ChildStorageCollection,
|
||||
StorageCollection, StorageKey, StorageValue, UsageInfo,
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use codec::Encode;
|
||||
use hash_db::Hasher;
|
||||
use sp_core::storage::{well_known_keys, ChildInfo, TrackedStorageKey};
|
||||
use sp_core::storage::{ChildInfo, TrackedStorageKey};
|
||||
#[cfg(feature = "std")]
|
||||
use sp_core::traits::RuntimeCode;
|
||||
use sp_std::vec::Vec;
|
||||
@@ -330,7 +330,11 @@ impl<'a, B: Backend<H>, H: Hasher> sp_core::traits::FetchRuntimeCode
|
||||
for BackendRuntimeCode<'a, B, H>
|
||||
{
|
||||
fn fetch_runtime_code<'b>(&'b self) -> Option<std::borrow::Cow<'b, [u8]>> {
|
||||
self.backend.storage(well_known_keys::CODE).ok().flatten().map(Into::into)
|
||||
self.backend
|
||||
.storage(sp_core::storage::well_known_keys::CODE)
|
||||
.ok()
|
||||
.flatten()
|
||||
.map(Into::into)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,17 +352,17 @@ where
|
||||
pub fn runtime_code(&self) -> Result<RuntimeCode, &'static str> {
|
||||
let hash = self
|
||||
.backend
|
||||
.storage_hash(well_known_keys::CODE)
|
||||
.storage_hash(sp_core::storage::well_known_keys::CODE)
|
||||
.ok()
|
||||
.flatten()
|
||||
.ok_or("`:code` hash not found")?
|
||||
.encode();
|
||||
let heap_pages = self
|
||||
.backend
|
||||
.storage(well_known_keys::HEAP_PAGES)
|
||||
.storage(sp_core::storage::well_known_keys::HEAP_PAGES)
|
||||
.ok()
|
||||
.flatten()
|
||||
.and_then(|d| Decode::decode(&mut &d[..]).ok());
|
||||
.and_then(|d| codec::Decode::decode(&mut &d[..]).ok());
|
||||
|
||||
Ok(RuntimeCode { code_fetcher: self, hash, heap_pages })
|
||||
}
|
||||
|
||||
@@ -17,17 +17,15 @@
|
||||
|
||||
//! Concrete externalities implementation.
|
||||
|
||||
use crate::{
|
||||
backend::Backend, overlayed_changes::OverlayedExtensions, IndexOperation, OverlayedChanges,
|
||||
StorageKey, StorageValue,
|
||||
};
|
||||
#[cfg(feature = "std")]
|
||||
use crate::overlayed_changes::OverlayedExtensions;
|
||||
use crate::{backend::Backend, IndexOperation, OverlayedChanges, StorageKey, StorageValue};
|
||||
use codec::{Decode, Encode, EncodeAppend};
|
||||
use hash_db::Hasher;
|
||||
use sp_core::{
|
||||
hexdisplay::HexDisplay,
|
||||
storage::{well_known_keys::is_child_storage_key, ChildInfo, TrackedStorageKey},
|
||||
};
|
||||
use sp_externalities::{Extension, ExtensionStore, Extensions, Externalities};
|
||||
#[cfg(feature = "std")]
|
||||
use sp_core::hexdisplay::HexDisplay;
|
||||
use sp_core::storage::{well_known_keys::is_child_storage_key, ChildInfo, TrackedStorageKey};
|
||||
use sp_externalities::{Extension, ExtensionStore, Externalities};
|
||||
use sp_trie::{empty_child_trie_root, trie_types::Layout};
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
@@ -37,7 +35,7 @@ use sp_std::{
|
||||
any::{Any, TypeId},
|
||||
boxed::Box,
|
||||
cmp::Ordering,
|
||||
fmt, vec,
|
||||
vec,
|
||||
vec::Vec,
|
||||
};
|
||||
#[cfg(feature = "std")]
|
||||
@@ -72,8 +70,8 @@ pub enum Error<B, E> {
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
impl<B: fmt::Display, E: fmt::Display> fmt::Display for Error<B, E> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
impl<B: std::fmt::Display, E: std::fmt::Display> std::fmt::Display for Error<B, E> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
match *self {
|
||||
Error::Backend(ref e) => write!(f, "Storage backend error: {}", e),
|
||||
Error::Executor(ref e) => write!(f, "Sub-call execution error: {}", e),
|
||||
@@ -139,7 +137,7 @@ where
|
||||
storage_transaction_cache: &'a mut StorageTransactionCache<B::Transaction, H, N>,
|
||||
backend: &'a B,
|
||||
changes_trie_state: Option<ChangesTrieState<'a, H, N>>,
|
||||
extensions: Option<&'a mut Extensions>,
|
||||
extensions: Option<&'a mut sp_externalities::Extensions>,
|
||||
) -> Self {
|
||||
Self {
|
||||
overlay,
|
||||
|
||||
@@ -55,11 +55,19 @@ pub use tracing::trace;
|
||||
#[cfg(not(feature = "std"))]
|
||||
#[macro_export]
|
||||
macro_rules! warn {
|
||||
(target: $target:expr, $($arg:tt)+) => {
|
||||
()
|
||||
(target: $target:expr, $message:expr $( , $arg:ident )* $( , )?) => {
|
||||
{
|
||||
$(
|
||||
let _ = &$arg;
|
||||
)*
|
||||
}
|
||||
};
|
||||
($($arg:tt)+) => {
|
||||
()
|
||||
($message:expr, $( $arg:expr, )*) => {
|
||||
{
|
||||
$(
|
||||
let _ = &$arg;
|
||||
)*
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -68,11 +76,12 @@ macro_rules! warn {
|
||||
#[cfg(not(feature = "std"))]
|
||||
#[macro_export]
|
||||
macro_rules! debug {
|
||||
(target: $target:expr, $($arg:tt)+) => {
|
||||
()
|
||||
};
|
||||
($($arg:tt)+) => {
|
||||
()
|
||||
(target: $target:expr, $message:expr $( , $arg:ident )* $( , )?) => {
|
||||
{
|
||||
$(
|
||||
let _ = &$arg;
|
||||
)*
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -24,7 +24,7 @@ use hash_db::{self, Hasher, Prefix};
|
||||
#[cfg(feature = "std")]
|
||||
use parking_lot::RwLock;
|
||||
use sp_core::storage::ChildInfo;
|
||||
use sp_std::{boxed::Box, ops::Deref, vec::Vec};
|
||||
use sp_std::{boxed::Box, vec::Vec};
|
||||
use sp_trie::{
|
||||
empty_child_trie_root, read_child_trie_value, read_trie_value,
|
||||
trie_types::{Layout, TrieDB, TrieError},
|
||||
@@ -37,8 +37,11 @@ use std::sync::Arc;
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
macro_rules! format {
|
||||
($($arg:tt)+) => {
|
||||
crate::DefaultError
|
||||
( $message:expr, $( $arg:expr )* ) => {
|
||||
{
|
||||
$( let _ = &$arg; )*
|
||||
crate::DefaultError
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -488,7 +491,7 @@ impl<H: Hasher> TrieBackendStorage<H> for Arc<dyn Storage<H>> {
|
||||
type Overlay = PrefixedMemoryDB<H>;
|
||||
|
||||
fn get(&self, key: &H::Out, prefix: Prefix) -> Result<Option<DBValue>> {
|
||||
Storage::<H>::get(self.deref(), key, prefix)
|
||||
Storage::<H>::get(std::ops::Deref::deref(self), key, prefix)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,6 @@ where
|
||||
.block;
|
||||
block_on(client.import(BlockOrigin::Own, a2.clone())).unwrap();
|
||||
|
||||
#[allow(deprecated)]
|
||||
assert_eq!(blockchain.leaves().unwrap(), vec![a2.hash()]);
|
||||
|
||||
// A2 -> A3
|
||||
|
||||
@@ -436,6 +436,10 @@ fn build_project(project: &Path, default_rustflags: &str, cargo_cmd: CargoComman
|
||||
// exclusive). The runner project is created in `CARGO_TARGET_DIR` and executing it will
|
||||
// create a sub target directory inside of `CARGO_TARGET_DIR`.
|
||||
.env_remove("CARGO_TARGET_DIR")
|
||||
// As we are being called inside a build-script, this env variable is set. However, we set
|
||||
// our own `RUSTFLAGS` and thus, we need to remove this. Otherwise cargo favors this
|
||||
// env variable.
|
||||
.env_remove("CARGO_ENCODED_RUSTFLAGS")
|
||||
// We don't want to call ourselves recursively
|
||||
.env(crate::SKIP_BUILD_ENV, "");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user