@@ -31,7 +31,7 @@ extern crate alloc;
31
31
32
32
use alloc:: vec:: Vec ;
33
33
use pallet_session:: historical:: IdentificationTuple ;
34
- use pallet_staking:: { BalanceOf , Exposure , ExposureOf , Pallet as Staking } ;
34
+ use pallet_staking:: Pallet as Staking ;
35
35
use sp_runtime:: Perbill ;
36
36
use sp_staking:: offence:: OnOffenceHandler ;
37
37
@@ -49,11 +49,8 @@ pub mod pallet {
49
49
+ pallet_staking:: Config
50
50
+ pallet_session:: Config < ValidatorId = <Self as frame_system:: Config >:: AccountId >
51
51
+ pallet_session:: historical:: Config <
52
- FullIdentification = Exposure <
53
- <Self as frame_system:: Config >:: AccountId ,
54
- BalanceOf < Self > ,
55
- > ,
56
- FullIdentificationOf = ExposureOf < Self > ,
52
+ FullIdentification = ( ) ,
53
+ FullIdentificationOf = pallet_staking:: NullIdentity ,
57
54
>
58
55
{
59
56
type RuntimeEvent : From < Event < Self > > + IsType < <Self as frame_system:: Config >:: RuntimeEvent > ;
@@ -106,15 +103,11 @@ pub mod pallet {
106
103
fn get_offence_details (
107
104
offenders : Vec < ( T :: AccountId , Perbill ) > ,
108
105
) -> Result < Vec < OffenceDetails < T > > , DispatchError > {
109
- let now = pallet_staking:: ActiveEra :: < T > :: get ( )
110
- . map ( |e| e. index )
111
- . ok_or ( Error :: < T > :: FailedToGetActiveEra ) ?;
112
-
113
106
Ok ( offenders
114
107
. clone ( )
115
108
. into_iter ( )
116
109
. map ( |( o, _) | OffenceDetails :: < T > {
117
- offender : ( o. clone ( ) , Staking :: < T > :: eras_stakers ( now , & o ) ) ,
110
+ offender : ( o. clone ( ) , ( ) ) ,
118
111
reporters : Default :: default ( ) ,
119
112
} )
120
113
. collect ( ) )
@@ -124,7 +117,7 @@ pub mod pallet {
124
117
fn submit_offence ( offenders : & [ OffenceDetails < T > ] , slash_fraction : & [ Perbill ] ) {
125
118
let session_index = <pallet_session:: Pallet < T > as frame_support:: traits:: ValidatorSet < T :: AccountId > >:: session_index ( ) ;
126
119
127
- <pallet_staking :: Pallet < T > as OnOffenceHandler <
120
+ <Staking < T > as OnOffenceHandler <
128
121
T :: AccountId ,
129
122
IdentificationTuple < T > ,
130
123
Weight ,
0 commit comments