mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 23:51:05 +00:00
Economic fixes for democracy module (#4256)
* Fix up `end_block` mess; add free preimage noting for imminents. * Fixes * Bump runtime * Update frame/democracy/src/lib.rs Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com> * Handle grumble * Update frame/democracy/src/lib.rs Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -78,8 +78,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
|||||||
// and set impl_version to equal spec_version. If only runtime
|
// and set impl_version to equal spec_version. If only runtime
|
||||||
// implementation changes and behavior does not, then leave spec_version as
|
// implementation changes and behavior does not, then leave spec_version as
|
||||||
// is and increment impl_version.
|
// is and increment impl_version.
|
||||||
spec_version: 196,
|
spec_version: 197,
|
||||||
impl_version: 196,
|
impl_version: 197,
|
||||||
apis: RUNTIME_API_VERSIONS,
|
apis: RUNTIME_API_VERSIONS,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -278,6 +278,8 @@ parameter_types! {
|
|||||||
pub const MinimumDeposit: Balance = 100 * DOLLARS;
|
pub const MinimumDeposit: Balance = 100 * DOLLARS;
|
||||||
pub const EnactmentPeriod: BlockNumber = 30 * 24 * 60 * MINUTES;
|
pub const EnactmentPeriod: BlockNumber = 30 * 24 * 60 * MINUTES;
|
||||||
pub const CooloffPeriod: BlockNumber = 28 * 24 * 60 * MINUTES;
|
pub const CooloffPeriod: BlockNumber = 28 * 24 * 60 * MINUTES;
|
||||||
|
// One cent: $10,000 / MB
|
||||||
|
pub const PreimageByteDeposit: Balance = 1 * CENTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl democracy::Trait for Runtime {
|
impl democracy::Trait for Runtime {
|
||||||
@@ -305,6 +307,8 @@ impl democracy::Trait for Runtime {
|
|||||||
// only do it once and it lasts only for the cooloff period.
|
// only do it once and it lasts only for the cooloff period.
|
||||||
type VetoOrigin = collective::EnsureMember<AccountId, TechnicalCollective>;
|
type VetoOrigin = collective::EnsureMember<AccountId, TechnicalCollective>;
|
||||||
type CooloffPeriod = CooloffPeriod;
|
type CooloffPeriod = CooloffPeriod;
|
||||||
|
type PreimageByteDeposit = PreimageByteDeposit;
|
||||||
|
type Slash = Treasury;
|
||||||
}
|
}
|
||||||
|
|
||||||
type CouncilCollective = collective::Instance1;
|
type CouncilCollective = collective::Instance1;
|
||||||
|
|||||||
@@ -517,7 +517,7 @@ impl<N: Ord> Peers<N> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn reshuffle(&mut self) {
|
fn reshuffle(&mut self) {
|
||||||
let mut lucky_peers : Vec<_> = self.inner
|
let mut lucky_peers: Vec<_> = self.inner
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|(id, info)| if !info.roles.is_authority() { Some(id.clone()) } else { None })
|
.filter_map(|(id, info)| if !info.roles.is_authority() { Some(id.clone()) } else { None })
|
||||||
.collect();
|
.collect();
|
||||||
@@ -670,7 +670,7 @@ impl<Block: BlockT> Inner<Block> {
|
|||||||
let set_id = local_view.set_id;
|
let set_id = local_view.set_id;
|
||||||
|
|
||||||
debug!(target: "afg", "Voter {} noting beginning of round {:?} to network.",
|
debug!(target: "afg", "Voter {} noting beginning of round {:?} to network.",
|
||||||
self.config.name(), (round,set_id));
|
self.config.name(), (round, set_id));
|
||||||
|
|
||||||
local_view.round = round;
|
local_view.round = round;
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user