File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -244,12 +244,12 @@ pub mod pallet {
244244 . saturating_add( T :: DbWeight :: get( ) . reads( 1_u64 ) )
245245 . saturating_add( T :: DbWeight :: get( ) . writes( 1_u64 ) ) ,
246246 DispatchClass :: Operational ,
247- Pays :: No
247+ Pays :: Yes
248248 ) ) ]
249249 pub fn announce_next_key (
250250 origin : OriginFor < T > ,
251251 public_key : BoundedVec < u8 , ConstU32 < 2048 > > ,
252- ) -> DispatchResult {
252+ ) -> DispatchResultWithPostInfo {
253253 // Only a current Aura validator may call this (signed account ∈ Aura authorities)
254254 T :: AuthorityOrigin :: ensure_validator ( origin) ?;
255255
@@ -259,9 +259,13 @@ pub mod pallet {
259259 Error :: <T >:: BadPublicKeyLen
260260 ) ;
261261
262- NextKey :: < T > :: put ( public_key. clone ( ) ) ;
262+ NextKey :: < T > :: put ( public_key) ;
263263
264- Ok ( ( ) )
264+ // Refund the fee on success by setting pays_fee = Pays::No
265+ Ok ( PostDispatchInfo {
266+ actual_weight : None ,
267+ pays_fee : Pays :: No ,
268+ } )
265269 }
266270
267271 /// Users submit an encrypted wrapper.
You can’t perform that action at this time.
0 commit comments