Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// implementation changes and behavior does not, then leave spec_version as
// is and increment impl_version.
spec_version: 223,
impl_version: 0,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
};

Expand Down
6 changes: 0 additions & 6 deletions frame/executive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@
//! # pub type AllModules = u64;
//! # pub enum Runtime {};
//! # use sp_runtime::transaction_validity::{TransactionValidity, UnknownTransaction};
//! # #[allow(deprecated)]
//! # use sp_runtime::traits::ValidateUnsigned;
//! # #[allow(deprecated)]
//! # impl ValidateUnsigned for Runtime {
//! # type Call = ();
//! #
Expand All @@ -88,7 +86,6 @@ use sp_runtime::{
transaction_validity::TransactionValidity,
};
use sp_runtime::generic::CheckSignature;
#[allow(deprecated)]
use sp_runtime::traits::ValidateUnsigned;
use codec::{Codec, Encode};
use frame_system::{extrinsics_root, DigestOf};
Expand All @@ -107,7 +104,6 @@ pub struct Executive<System, Block, Context, UnsignedValidator, AllModules>(
PhantomData<(System, Block, Context, UnsignedValidator, AllModules)>
);

#[allow(deprecated)] // Allow ValidateUnsigned, remove the attribute when the trait is removed.
impl<
System: frame_system::Trait,
Block: traits::Block<Header=System::Header, Hash=System::Hash>,
Expand All @@ -133,7 +129,6 @@ where
}
}

#[allow(deprecated)] // Allow ValidateUnsigned, remove the attribute when the trait is removed.
impl<
System: frame_system::Trait,
Block: traits::Block<Header=System::Header, Hash=System::Hash>,
Expand Down Expand Up @@ -496,7 +491,6 @@ mod tests {
}
impl custom::Trait for Runtime {}

#[allow(deprecated)]
impl ValidateUnsigned for Runtime {
type Call = Call;

Expand Down
1 change: 0 additions & 1 deletion frame/im-online/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,6 @@ impl<T: Trait> pallet_session::OneSessionHandler<T::AccountId> for Module<T> {
}
}

#[allow(deprecated)]
impl<T: Trait> frame_support::unsigned::ValidateUnsigned for Module<T> {
type Call = Call<T>;

Expand Down
2 changes: 0 additions & 2 deletions frame/im-online/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ fn heartbeat(
authority_index: u32,
id: UintAuthorityId,
) -> dispatch::DispatchResult {
#[allow(deprecated)]
use frame_support::unsigned::ValidateUnsigned;

let heartbeat = Heartbeat {
Expand All @@ -126,7 +125,6 @@ fn heartbeat(
};
let signature = id.sign(&heartbeat.encode()).unwrap();

#[allow(deprecated)] // Allow ValidateUnsigned
ImOnline::pre_dispatch(&crate::Call::heartbeat(heartbeat.clone(), signature.clone()))
.map_err(|e| <&'static str>::from(e))?;
ImOnline::heartbeat(
Expand Down
3 changes: 0 additions & 3 deletions frame/support/src/unsigned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.

#[doc(hidden)]
#[allow(deprecated)]
pub use crate::sp_runtime::traits::ValidateUnsigned;
#[doc(hidden)]
pub use crate::sp_runtime::transaction_validity::{
Expand Down Expand Up @@ -66,7 +65,6 @@ macro_rules! impl_outer_validate_unsigned {
$( $module:ident )*
}
) => {
#[allow(deprecated)] // Allow ValidateUnsigned
impl $crate::unsigned::ValidateUnsigned for $runtime {
type Call = Call;

Expand Down Expand Up @@ -109,7 +107,6 @@ mod test_partial_and_full_call {
pub mod timestamp {
pub struct Module;

#[allow(deprecated)] // Allow ValidateUnsigned
impl super::super::ValidateUnsigned for Module {
type Call = Call;

Expand Down
3 changes: 0 additions & 3 deletions primitives/runtime/src/generic/checked_extrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use crate::traits::{
self, Member, MaybeDisplay, SignedExtension, Dispatchable,
};
#[allow(deprecated)]
use crate::traits::ValidateUnsigned;
use crate::transaction_validity::TransactionValidity;

Expand Down Expand Up @@ -54,7 +53,6 @@ where
self.signed.as_ref().map(|x| &x.0)
}

#[allow(deprecated)] // Allow ValidateUnsigned
fn validate<U: ValidateUnsigned<Call = Self::Call>>(
&self,
info: Self::DispatchInfo,
Expand All @@ -69,7 +67,6 @@ where
}
}

#[allow(deprecated)] // Allow ValidateUnsigned
fn apply<U: ValidateUnsigned<Call=Self::Call>>(
self,
info: Self::DispatchInfo,
Expand Down
3 changes: 0 additions & 3 deletions primitives/runtime/src/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use crate::traits::{
self, Checkable, Applyable, BlakeTwo256, OpaqueKeys,
SignedExtension, Dispatchable,
};
#[allow(deprecated)]
use crate::traits::ValidateUnsigned;
use crate::{generic::{self, CheckSignature}, KeyTypeId, ApplyExtrinsicResult};
pub use sp_core::{H256, sr25519};
Expand Down Expand Up @@ -418,7 +417,6 @@ impl<Origin, Call, Extra, Info> Applyable for TestXt<Call, Extra> where
fn sender(&self) -> Option<&Self::AccountId> { self.signature.as_ref().map(|x| &x.0) }

/// Checks to see if this is a valid *transaction*. It returns information on it if so.
#[allow(deprecated)] // Allow ValidateUnsigned
fn validate<U: ValidateUnsigned<Call=Self::Call>>(
&self,
_info: Self::DispatchInfo,
Expand All @@ -429,7 +427,6 @@ impl<Origin, Call, Extra, Info> Applyable for TestXt<Call, Extra> where

/// Executes all necessary logic needed prior to dispatch and deconstructs into function call,
/// index and sender.
#[allow(deprecated)] // Allow ValidateUnsigned
fn apply<U: ValidateUnsigned<Call=Self::Call>>(
self,
info: Self::DispatchInfo,
Expand Down
3 changes: 0 additions & 3 deletions primitives/runtime/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,6 @@ pub trait Applyable: Sized + Send + Sync {
fn sender(&self) -> Option<&Self::AccountId>;

/// Checks to see if this is a valid *transaction*. It returns information on it if so.
#[allow(deprecated)] // Allow ValidateUnsigned
fn validate<V: ValidateUnsigned<Call=Self::Call>>(
&self,
info: Self::DispatchInfo,
Expand All @@ -898,7 +897,6 @@ pub trait Applyable: Sized + Send + Sync {

/// Executes all necessary logic needed prior to dispatch and deconstructs into function call,
/// index and sender.
#[allow(deprecated)] // Allow ValidateUnsigned
fn apply<V: ValidateUnsigned<Call=Self::Call>>(
self,
info: Self::DispatchInfo,
Expand All @@ -924,7 +922,6 @@ pub trait GetNodeBlockType {
/// the transaction for the transaction pool.
/// During block execution phase one need to perform the same checks anyway,
/// since this function is not being called.
#[deprecated(note = "Use SignedExtensions instead.")]
pub trait ValidateUnsigned {
/// The call to validate
type Call;
Expand Down