mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 09:21:02 +00:00
Enable Offchain Phragmén. (#940)
* fix for offchain phragmen * Update unix time stuff
This commit is contained in:
@@ -1205,6 +1205,7 @@ mod tests {
|
||||
BlakeTwo256, IdentityLookup, SaturatedConversion,
|
||||
OpaqueKeys,
|
||||
},
|
||||
testing::TestXt,
|
||||
};
|
||||
use primitives::{
|
||||
parachain::{
|
||||
@@ -1239,6 +1240,7 @@ mod tests {
|
||||
impl_outer_dispatch! {
|
||||
pub enum Call for Test where origin: Origin {
|
||||
parachains::Parachains,
|
||||
staking::Staking,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1304,6 +1306,7 @@ mod tests {
|
||||
type ValidatorId = u64;
|
||||
type ValidatorIdOf = staking::StashOf<Self>;
|
||||
type ShouldEndSession = session::PeriodicSessions<Period, Offset>;
|
||||
type NextSessionRotation = session::PeriodicSessions<Period, Offset>;
|
||||
type SessionManager = session::historical::NoteHistoricalRoot<Self, Staking>;
|
||||
type SessionHandler = TestSessionHandler;
|
||||
type Keys = TestSessionKeys;
|
||||
@@ -1375,6 +1378,7 @@ mod tests {
|
||||
pub const AttestationPeriod: BlockNumber = 100;
|
||||
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
|
||||
pub const MaxNominatorRewardedPerValidator: u32 = 64;
|
||||
pub const ElectionLookahead: BlockNumber = 0;
|
||||
}
|
||||
|
||||
pub struct CurrencyToVoteHandler;
|
||||
@@ -1402,6 +1406,10 @@ mod tests {
|
||||
type UnixTime = timestamp::Module<Test>;
|
||||
type RewardCurve = RewardCurve;
|
||||
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
|
||||
type NextNewSession = Session;
|
||||
type ElectionLookahead = ElectionLookahead;
|
||||
type Call = Call;
|
||||
type SubmitTransaction = system::offchain::TransactionSubmitter<(), Test, TestXt<Call, ()>>;
|
||||
}
|
||||
|
||||
impl attestations::Trait for Test {
|
||||
|
||||
@@ -653,7 +653,7 @@ mod tests {
|
||||
traits::{
|
||||
BlakeTwo256, IdentityLookup, Dispatchable,
|
||||
AccountIdConversion,
|
||||
}, testing::{UintAuthorityId, Header}, KeyTypeId, Perbill, curve::PiecewiseLinear,
|
||||
}, testing::{UintAuthorityId, Header, TestXt}, KeyTypeId, Perbill, curve::PiecewiseLinear,
|
||||
};
|
||||
use primitives::{
|
||||
parachain::{
|
||||
@@ -683,6 +683,7 @@ mod tests {
|
||||
pub enum Call for Test where origin: Origin {
|
||||
parachains::Parachains,
|
||||
registrar::Registrar,
|
||||
staking::Staking,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -779,6 +780,7 @@ mod tests {
|
||||
type SessionManager = ();
|
||||
type Keys = UintAuthorityId;
|
||||
type ShouldEndSession = session::PeriodicSessions<Period, Offset>;
|
||||
type NextSessionRotation = session::PeriodicSessions<Period, Offset>;
|
||||
type SessionHandler = session::TestSessionHandler;
|
||||
type Event = ();
|
||||
type ValidatorId = u64;
|
||||
@@ -789,6 +791,7 @@ mod tests {
|
||||
parameter_types! {
|
||||
pub const MaxHeadDataSize: u32 = 100;
|
||||
pub const MaxCodeSize: u32 = 100;
|
||||
pub const ElectionLookahead: BlockNumber = 0;
|
||||
}
|
||||
|
||||
impl staking::Trait for Test {
|
||||
@@ -806,6 +809,10 @@ mod tests {
|
||||
type UnixTime = timestamp::Module<Test>;
|
||||
type RewardCurve = RewardCurve;
|
||||
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
|
||||
type NextNewSession = Session;
|
||||
type ElectionLookahead = ElectionLookahead;
|
||||
type Call = Call;
|
||||
type SubmitTransaction = system::offchain::TransactionSubmitter<(), Test, TestXt<Call, ()>>;
|
||||
}
|
||||
|
||||
impl timestamp::Trait for Test {
|
||||
@@ -857,6 +864,8 @@ mod tests {
|
||||
type Slots = slots::Module<Test>;
|
||||
type Registrar = Module<Test>;
|
||||
type RandomnessCollectiveFlip = randomness_collective_flip::Module<Test>;
|
||||
type Session = session::Module<Test>;
|
||||
type Staking = staking::Module<Test>;
|
||||
|
||||
const AUTHORITY_KEYS: [Sr25519Keyring; 8] = [
|
||||
Sr25519Keyring::Alice,
|
||||
|
||||
Reference in New Issue
Block a user