mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
Reward validators for participating in parachains (#2089)
* plumbing for rewarding backers * give validators reward points for participating * fix tests * add bitfield rewarding * add mocks for backing rewards * add testing for backing & availability rewards * implement RewardValidators on top of staking * add to test-runtime and rococo * add to test-runtime & rococo * point to source on rewards values * fix common tests * do not reward availability anymore
This commit is contained in:
committed by
GitHub
parent
34e5812171
commit
f4e930529b
@@ -262,7 +262,7 @@ mod tests {
|
||||
}, testing::{UintAuthorityId, TestXt}, Perbill, curve::PiecewiseLinear,
|
||||
};
|
||||
use primitives::v1::{
|
||||
Balance, BlockNumber, Header, Signature, AuthorityDiscoveryId,
|
||||
Balance, BlockNumber, Header, Signature, AuthorityDiscoveryId, ValidatorIndex,
|
||||
};
|
||||
use frame_system::limits;
|
||||
use frame_support::{
|
||||
@@ -472,8 +472,16 @@ mod tests {
|
||||
|
||||
impl configuration::Config for Test { }
|
||||
|
||||
pub struct TestRewardValidators;
|
||||
|
||||
impl inclusion::RewardValidators for TestRewardValidators {
|
||||
fn reward_backing(_: impl IntoIterator<Item = ValidatorIndex>) { }
|
||||
fn reward_bitfields(_: impl IntoIterator<Item = ValidatorIndex>) { }
|
||||
}
|
||||
|
||||
impl inclusion::Config for Test {
|
||||
type Event = ();
|
||||
type RewardValidators = TestRewardValidators;
|
||||
}
|
||||
|
||||
impl session_info::AuthorityDiscoveryConfig for Test {
|
||||
|
||||
Reference in New Issue
Block a user