Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
open-runtime-module-library
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Noxim
open-runtime-module-library
Commits
a148d885
Unverified
Commit
a148d885
authored
4 years ago
by
wangjj9219
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
remove unnecessary thread_local defination (#335)
parent
f69c13bf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tokens/src/mock.rs
+5
-39
5 additions, 39 deletions
tokens/src/mock.rs
with
5 additions
and
39 deletions
tokens/src/mock.rs
+
5
−
39
View file @
a148d885
...
@@ -161,45 +161,6 @@ impl pallet_treasury::Config for Runtime {
...
@@ -161,45 +161,6 @@ impl pallet_treasury::Config for Runtime {
}
}
pub
type
Treasury
=
pallet_treasury
::
Module
<
Runtime
>
;
pub
type
Treasury
=
pallet_treasury
::
Module
<
Runtime
>
;
parameter_types!
{
pub
const
CandidacyBond
:
u64
=
3
;
}
thread_local!
{
static
VOTING_BOND
:
RefCell
<
u64
>
=
RefCell
::
new
(
2
);
static
DESIRED_MEMBERS
:
RefCell
<
u32
>
=
RefCell
::
new
(
2
);
static
DESIRED_RUNNERS_UP
:
RefCell
<
u32
>
=
RefCell
::
new
(
2
);
static
TERM_DURATION
:
RefCell
<
u64
>
=
RefCell
::
new
(
5
);
}
pub
struct
VotingBond
;
impl
Get
<
u64
>
for
VotingBond
{
fn
get
()
->
u64
{
VOTING_BOND
.with
(|
v
|
*
v
.borrow
())
}
}
pub
struct
DesiredMembers
;
impl
Get
<
u32
>
for
DesiredMembers
{
fn
get
()
->
u32
{
DESIRED_MEMBERS
.with
(|
v
|
*
v
.borrow
())
}
}
pub
struct
DesiredRunnersUp
;
impl
Get
<
u32
>
for
DesiredRunnersUp
{
fn
get
()
->
u32
{
DESIRED_RUNNERS_UP
.with
(|
v
|
*
v
.borrow
())
}
}
pub
struct
TermDuration
;
impl
Get
<
u64
>
for
TermDuration
{
fn
get
()
->
u64
{
TERM_DURATION
.with
(|
v
|
*
v
.borrow
())
}
}
thread_local!
{
thread_local!
{
pub
static
MEMBERS
:
RefCell
<
Vec
<
AccountId
>>
=
RefCell
::
new
(
vec!
[]);
pub
static
MEMBERS
:
RefCell
<
Vec
<
AccountId
>>
=
RefCell
::
new
(
vec!
[]);
pub
static
PRIME
:
RefCell
<
Option
<
AccountId
>>
=
RefCell
::
new
(
None
);
pub
static
PRIME
:
RefCell
<
Option
<
AccountId
>>
=
RefCell
::
new
(
None
);
...
@@ -250,6 +211,11 @@ impl ChangeMembers<AccountId> for TestChangeMembers {
...
@@ -250,6 +211,11 @@ impl ChangeMembers<AccountId> for TestChangeMembers {
parameter_types!
{
parameter_types!
{
pub
const
ElectionsPhragmenModuleId
:
LockIdentifier
=
*
b"phrelect"
;
pub
const
ElectionsPhragmenModuleId
:
LockIdentifier
=
*
b"phrelect"
;
pub
const
CandidacyBond
:
u64
=
3
;
pub
const
VotingBond
:
u64
=
2
;
pub
const
DesiredMembers
:
u32
=
2
;
pub
const
DesiredRunnersUp
:
u32
=
2
;
pub
const
TermDuration
:
u64
=
5
;
}
}
impl
pallet_elections_phragmen
::
Config
for
Runtime
{
impl
pallet_elections_phragmen
::
Config
for
Runtime
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment