Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
ad6619d8
Unverified
Commit
ad6619d8
authored
Jul 02, 2020
by
Gavin Wood
Committed by
GitHub
Jul 02, 2020
Browse files
Revert "Companion PR for Allow specify schedule dispatch origin #6387" (#1340)
parent
7826efea
Pipeline
#99201
passed with stages
in 23 minutes and 39 seconds
Changes
4
Pipelines
2
Show whitespace changes
Inline
Side-by-side
runtime/common/src/parachains.rs
View file @
ad6619d8
...
@@ -333,7 +333,7 @@ pub trait Trait: CreateSignedTransaction<Call<Self>> + attestations::Trait + ses
...
@@ -333,7 +333,7 @@ pub trait Trait: CreateSignedTransaction<Call<Self>> + attestations::Trait + ses
}
}
/// Origin for the parachains module.
/// Origin for the parachains module.
#[derive(PartialEq,
Eq,
Clone
,
Encode,
Decode
)]
#[derive(PartialEq,
Eq,
Clone)]
#[cfg_attr(feature
=
"std"
,
derive(Debug))]
#[cfg_attr(feature
=
"std"
,
derive(Debug))]
pub
enum
Origin
{
pub
enum
Origin
{
/// It comes from a parachain.
/// It comes from a parachain.
...
...
runtime/kusama/src/lib.rs
View file @
ad6619d8
...
@@ -152,10 +152,8 @@ impl system::Trait for Runtime {
...
@@ -152,10 +152,8 @@ impl system::Trait for Runtime {
impl
scheduler
::
Trait
for
Runtime
{
impl
scheduler
::
Trait
for
Runtime
{
type
Event
=
Event
;
type
Event
=
Event
;
type
Origin
=
Origin
;
type
Origin
=
Origin
;
type
PalletsOrigin
=
OriginCaller
;
type
Call
=
Call
;
type
Call
=
Call
;
type
MaximumWeight
=
MaximumBlockWeight
;
type
MaximumWeight
=
MaximumBlockWeight
;
type
ScheduleOrigin
=
EnsureRoot
<
AccountId
>
;
}
}
parameter_types!
{
parameter_types!
{
...
@@ -375,7 +373,6 @@ impl democracy::Trait for Runtime {
...
@@ -375,7 +373,6 @@ impl democracy::Trait for Runtime {
type
PreimageByteDeposit
=
PreimageByteDeposit
;
type
PreimageByteDeposit
=
PreimageByteDeposit
;
type
Slash
=
Treasury
;
type
Slash
=
Treasury
;
type
Scheduler
=
Scheduler
;
type
Scheduler
=
Scheduler
;
type
PalletsOrigin
=
OriginCaller
;
type
MaxVotes
=
MaxVotes
;
type
MaxVotes
=
MaxVotes
;
type
OperationalPreimageOrigin
=
collective
::
EnsureMember
<
AccountId
,
CouncilCollective
>
;
type
OperationalPreimageOrigin
=
collective
::
EnsureMember
<
AccountId
,
CouncilCollective
>
;
}
}
...
@@ -892,14 +889,10 @@ impl proxy::Trait for Runtime {
...
@@ -892,14 +889,10 @@ impl proxy::Trait for Runtime {
}
}
pub
struct
CustomOnRuntimeUpgrade
;
pub
struct
CustomOnRuntimeUpgrade
;
impl
frame_support
::
traits
::
OnRuntimeUpgrade
for
CustomOnRuntimeUpgrade
{
impl
frame_support
::
traits
::
OnRuntimeUpgrade
for
CustomOnRuntimeUpgrade
{
fn
on_runtime_upgrade
()
->
frame_support
::
weights
::
Weight
{
fn
on_runtime_upgrade
()
->
frame_support
::
weights
::
Weight
{
treasury
::
Module
::
<
Runtime
>
::
migrate_retract_tip_for_tip_new
();
treasury
::
Module
::
<
Runtime
>
::
migrate_retract_tip_for_tip_new
();
if
scheduler
::
Module
::
<
Runtime
>
::
migrate_v1_to_t2
()
{
500_000_000
<
Runtime
as
system
::
Trait
>
::
MaximumBlockWeight
::
get
()
}
else
{
<
Runtime
as
system
::
Trait
>
::
DbWeight
::
get
()
.reads
(
1
)
+
500_000_000
}
}
}
}
}
...
...
runtime/polkadot/src/lib.rs
View file @
ad6619d8
...
@@ -183,10 +183,8 @@ impl system::Trait for Runtime {
...
@@ -183,10 +183,8 @@ impl system::Trait for Runtime {
impl
scheduler
::
Trait
for
Runtime
{
impl
scheduler
::
Trait
for
Runtime
{
type
Event
=
Event
;
type
Event
=
Event
;
type
Origin
=
Origin
;
type
Origin
=
Origin
;
type
PalletsOrigin
=
OriginCaller
;
type
Call
=
Call
;
type
Call
=
Call
;
type
MaximumWeight
=
MaximumBlockWeight
;
type
MaximumWeight
=
MaximumBlockWeight
;
type
ScheduleOrigin
=
EnsureRoot
<
AccountId
>
;
}
}
parameter_types!
{
parameter_types!
{
...
@@ -444,7 +442,6 @@ impl democracy::Trait for Runtime {
...
@@ -444,7 +442,6 @@ impl democracy::Trait for Runtime {
type
OperationalPreimageOrigin
=
collective
::
EnsureMember
<
AccountId
,
CouncilCollective
>
;
type
OperationalPreimageOrigin
=
collective
::
EnsureMember
<
AccountId
,
CouncilCollective
>
;
type
Slash
=
Treasury
;
type
Slash
=
Treasury
;
type
Scheduler
=
Scheduler
;
type
Scheduler
=
Scheduler
;
type
PalletsOrigin
=
OriginCaller
;
type
MaxVotes
=
MaxVotes
;
type
MaxVotes
=
MaxVotes
;
}
}
...
@@ -896,17 +893,6 @@ impl proxy::Trait for Runtime {
...
@@ -896,17 +893,6 @@ impl proxy::Trait for Runtime {
type
MaxProxies
=
MaxProxies
;
type
MaxProxies
=
MaxProxies
;
}
}
pub
struct
CustomOnRuntimeUpgrade
;
impl
frame_support
::
traits
::
OnRuntimeUpgrade
for
CustomOnRuntimeUpgrade
{
fn
on_runtime_upgrade
()
->
frame_support
::
weights
::
Weight
{
if
scheduler
::
Module
::
<
Runtime
>
::
migrate_v1_to_t2
()
{
<
Runtime
as
system
::
Trait
>
::
MaximumBlockWeight
::
get
()
}
else
{
<
Runtime
as
system
::
Trait
>
::
DbWeight
::
get
()
.reads
(
1
)
}
}
}
construct_runtime!
{
construct_runtime!
{
pub
enum
Runtime
where
pub
enum
Runtime
where
Block
=
Block
,
Block
=
Block
,
...
@@ -1004,14 +990,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signatu
...
@@ -1004,14 +990,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signatu
/// Extrinsic type that has already been checked.
/// Extrinsic type that has already been checked.
pub
type
CheckedExtrinsic
=
generic
::
CheckedExtrinsic
<
AccountId
,
Nonce
,
Call
>
;
pub
type
CheckedExtrinsic
=
generic
::
CheckedExtrinsic
<
AccountId
,
Nonce
,
Call
>
;
/// Executive: handles dispatch to the various modules.
/// Executive: handles dispatch to the various modules.
pub
type
Executive
=
executive
::
Executive
<
pub
type
Executive
=
executive
::
Executive
<
Runtime
,
Block
,
system
::
ChainContext
<
Runtime
>
,
Runtime
,
AllModules
>
;
Runtime
,
Block
,
system
::
ChainContext
<
Runtime
>
,
Runtime
,
AllModules
,
CustomOnRuntimeUpgrade
>
;
/// The payload being signed in transactions.
/// The payload being signed in transactions.
pub
type
SignedPayload
=
generic
::
SignedPayload
<
Call
,
SignedExtra
>
;
pub
type
SignedPayload
=
generic
::
SignedPayload
<
Call
,
SignedExtra
>
;
...
...
runtime/westend/src/lib.rs
View file @
ad6619d8
...
@@ -58,7 +58,6 @@ use im_online::sr25519::AuthorityId as ImOnlineId;
...
@@ -58,7 +58,6 @@ use im_online::sr25519::AuthorityId as ImOnlineId;
use
authority_discovery_primitives
::
AuthorityId
as
AuthorityDiscoveryId
;
use
authority_discovery_primitives
::
AuthorityId
as
AuthorityDiscoveryId
;
use
transaction_payment_rpc_runtime_api
::
RuntimeDispatchInfo
;
use
transaction_payment_rpc_runtime_api
::
RuntimeDispatchInfo
;
use
session
::
historical
as
session_historical
;
use
session
::
historical
as
session_historical
;
use
system
::
EnsureRoot
;
#[cfg(feature
=
"std"
)]
#[cfg(feature
=
"std"
)]
pub
use
staking
::
StakerStatus
;
pub
use
staking
::
StakerStatus
;
...
@@ -142,10 +141,8 @@ impl system::Trait for Runtime {
...
@@ -142,10 +141,8 @@ impl system::Trait for Runtime {
impl
scheduler
::
Trait
for
Runtime
{
impl
scheduler
::
Trait
for
Runtime
{
type
Event
=
Event
;
type
Event
=
Event
;
type
Origin
=
Origin
;
type
Origin
=
Origin
;
type
PalletsOrigin
=
OriginCaller
;
type
Call
=
Call
;
type
Call
=
Call
;
type
MaximumWeight
=
MaximumBlockWeight
;
type
MaximumWeight
=
MaximumBlockWeight
;
type
ScheduleOrigin
=
EnsureRoot
<
AccountId
>
;
}
}
parameter_types!
{
parameter_types!
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment