mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
* Companion PR to #5560 * Set priorities. * Update substrate. * Fix tests. * Update Substrate * Companion of SignedExtension refactor (#5540) Co-authored-by: Tomasz Drwięga <tomasz@parity.io> Co-authored-by: Alexander Theißen <alexander.theissen@parity.io>
This commit is contained in:
@@ -36,10 +36,13 @@ use sp_runtime::{
|
||||
create_runtime_str, generic, impl_opaque_keys,
|
||||
ApplyExtrinsicResult, Perbill, RuntimeDebug, KeyTypeId,
|
||||
transaction_validity::{
|
||||
TransactionValidity, InvalidTransaction, TransactionValidityError, TransactionSource,
|
||||
TransactionValidity, InvalidTransaction, TransactionValidityError, TransactionSource, TransactionPriority,
|
||||
},
|
||||
curve::PiecewiseLinear,
|
||||
traits::{BlakeTwo256, Block as BlockT, StaticLookup, SignedExtension, OpaqueKeys, ConvertInto},
|
||||
traits::{
|
||||
BlakeTwo256, Block as BlockT, StaticLookup, SignedExtension, OpaqueKeys, ConvertInto,
|
||||
DispatchInfoOf,
|
||||
},
|
||||
};
|
||||
use version::RuntimeVersion;
|
||||
use grandpa::{AuthorityId as GrandpaId, fg_primitives};
|
||||
@@ -50,7 +53,6 @@ use sp_staking::SessionIndex;
|
||||
use frame_support::{
|
||||
parameter_types, construct_runtime,
|
||||
traits::{KeyOwnerProofSystem, Randomness},
|
||||
weights::DispatchInfo,
|
||||
};
|
||||
use pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo;
|
||||
use session::historical as session_historical;
|
||||
@@ -100,11 +102,16 @@ impl SignedExtension for RestrictFunctionality {
|
||||
type Call = Call;
|
||||
type AdditionalSigned = ();
|
||||
type Pre = ();
|
||||
type DispatchInfo = DispatchInfo;
|
||||
|
||||
fn additional_signed(&self) -> rstd::result::Result<(), TransactionValidityError> { Ok(()) }
|
||||
|
||||
fn validate(&self, _: &Self::AccountId, call: &Self::Call, _: DispatchInfo, _: usize)
|
||||
fn validate(
|
||||
&self,
|
||||
_: &Self::AccountId,
|
||||
call: &Self::Call,
|
||||
_: &DispatchInfoOf<Self::Call>,
|
||||
_: usize
|
||||
)
|
||||
-> TransactionValidity
|
||||
{
|
||||
match call {
|
||||
@@ -269,6 +276,7 @@ parameter_types! {
|
||||
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
|
||||
pub const MaxNominatorRewardedPerValidator: u32 = 64;
|
||||
pub const ElectionLookahead: BlockNumber = 0;
|
||||
pub const StakingUnsignedPriority: TransactionPriority = TransactionPriority::max_value() / 2;
|
||||
}
|
||||
|
||||
impl staking::Trait for Runtime {
|
||||
@@ -291,6 +299,7 @@ impl staking::Trait for Runtime {
|
||||
type ElectionLookahead = ElectionLookahead;
|
||||
type Call = Call;
|
||||
type SubmitTransaction = system::offchain::TransactionSubmitter<(), Runtime, Extrinsic>;
|
||||
type UnsignedPriority = StakingUnsignedPriority;
|
||||
}
|
||||
|
||||
impl grandpa::Trait for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user