@@ -23,10 +23,11 @@ mod default_weights;
2323
2424use codec:: { Codec , Decode , Encode } ;
2525use frame_support:: sp_runtime:: traits:: Zero ;
26- use frame_support:: traits:: { Currency , FindAuthor , Get } ;
26+ use frame_support:: traits:: { Currency , Get } ;
2727use frame_support:: weights:: Weight ;
2828pub use pallet:: * ;
2929use scale_info:: TypeInfo ;
30+ use subspace_runtime_primitives:: FindBlockRewardAddress ;
3031
3132type BalanceOf < T > =
3233 <<T as Config >:: Currency as Currency < <T as frame_system:: Config >:: AccountId > >:: Balance ;
@@ -47,8 +48,9 @@ struct CollectedFees<Balance: Codec> {
4748mod pallet {
4849 use super :: { BalanceOf , CollectedFees , WeightInfo } ;
4950 use frame_support:: pallet_prelude:: * ;
50- use frame_support:: traits:: { Currency , FindAuthor } ;
51+ use frame_support:: traits:: Currency ;
5152 use frame_system:: pallet_prelude:: * ;
53+ use subspace_runtime_primitives:: FindBlockRewardAddress ;
5254
5355 #[ pallet:: config]
5456 pub trait Config : frame_system:: Config {
@@ -85,7 +87,7 @@ mod pallet {
8587
8688 type Currency : Currency < Self :: AccountId > ;
8789
88- type FindAuthor : FindAuthor < Self :: AccountId > ;
90+ type FindBlockRewardAddress : FindBlockRewardAddress < Self :: AccountId > ;
8991
9092 type WeightInfo : WeightInfo ;
9193 }
@@ -172,7 +174,7 @@ where
172174 BalanceOf < T > : From < u64 > ,
173175{
174176 fn do_initialize ( _n : T :: BlockNumber ) {
175- let block_author = T :: FindAuthor :: find_author (
177+ let block_author = T :: FindBlockRewardAddress :: find_block_reward_address (
176178 frame_system:: Pallet :: < T > :: digest ( )
177179 . logs
178180 . iter ( )
0 commit comments