@@ -462,7 +462,7 @@ pub mod pallet {
462462 ///
463463 /// Parameters:
464464 ///
465- /// - `hash `: The BLAKE2b hash of the data to be submitted.
465+ /// - `content_hash `: The BLAKE2b hash of the data to be submitted.
466466 /// - `max_size`: The maximum size, in bytes, of the preimage.
467467 ///
468468 /// The origin for this call must be the pallet's `Authorizer`. Emits
@@ -471,12 +471,12 @@ pub mod pallet {
471471 #[ pallet:: weight( T :: WeightInfo :: authorize_preimage( ) ) ]
472472 pub fn authorize_preimage (
473473 origin : OriginFor < T > ,
474- hash : ContentHash ,
474+ content_hash : ContentHash ,
475475 max_size : u64 ,
476476 ) -> DispatchResult {
477477 T :: Authorizer :: ensure_origin ( origin) ?;
478- Self :: authorize ( AuthorizationScope :: Preimage ( hash ) , 1 , max_size) ;
479- Self :: deposit_event ( Event :: PreimageAuthorized { hash , max_size } ) ;
478+ Self :: authorize ( AuthorizationScope :: Preimage ( content_hash ) , 1 , max_size) ;
479+ Self :: deposit_event ( Event :: PreimageAuthorized { content_hash , max_size } ) ;
480480 Ok ( ( ) )
481481 }
482482
@@ -503,7 +503,7 @@ pub mod pallet {
503503 ///
504504 /// Parameters:
505505 ///
506- /// - `hash `: The BLAKE2b hash that was authorized.
506+ /// - `content_hash `: The BLAKE2b hash that was authorized.
507507 ///
508508 /// Emits
509509 /// [`ExpiredPreimageAuthorizationRemoved`](Event::ExpiredPreimageAuthorizationRemoved)
@@ -512,10 +512,10 @@ pub mod pallet {
512512 #[ pallet:: weight( T :: WeightInfo :: remove_expired_preimage_authorization( ) ) ]
513513 pub fn remove_expired_preimage_authorization (
514514 _origin : OriginFor < T > ,
515- hash : ContentHash ,
515+ content_hash : ContentHash ,
516516 ) -> DispatchResult {
517- Self :: remove_expired_authorization ( AuthorizationScope :: Preimage ( hash ) ) ?;
518- Self :: deposit_event ( Event :: ExpiredPreimageAuthorizationRemoved { hash } ) ;
517+ Self :: remove_expired_authorization ( AuthorizationScope :: Preimage ( content_hash ) ) ?;
518+ Self :: deposit_event ( Event :: ExpiredPreimageAuthorizationRemoved { content_hash } ) ;
519519 Ok ( ( ) )
520520 }
521521
@@ -547,7 +547,7 @@ pub mod pallet {
547547 ///
548548 /// Parameters:
549549 ///
550- /// - `hash `: The BLAKE2b hash of the data to be submitted.
550+ /// - `content_hash `: The BLAKE2b hash of the data to be submitted.
551551 ///
552552 /// The origin for this call must be the pallet's `Authorizer`. Emits
553553 /// [`PreimageAuthorizationRefreshed`](Event::PreimageAuthorizationRefreshed) when
@@ -556,11 +556,11 @@ pub mod pallet {
556556 #[ pallet:: weight( T :: WeightInfo :: refresh_preimage_authorization( ) ) ]
557557 pub fn refresh_preimage_authorization (
558558 origin : OriginFor < T > ,
559- hash : ContentHash ,
559+ content_hash : ContentHash ,
560560 ) -> DispatchResult {
561561 T :: Authorizer :: ensure_origin ( origin) ?;
562- Self :: refresh_authorization ( AuthorizationScope :: Preimage ( hash ) ) ?;
563- Self :: deposit_event ( Event :: PreimageAuthorizationRefreshed { hash } ) ;
562+ Self :: refresh_authorization ( AuthorizationScope :: Preimage ( content_hash ) ) ?;
563+ Self :: deposit_event ( Event :: PreimageAuthorizationRefreshed { content_hash } ) ;
564564 Ok ( ( ) )
565565 }
566566 }
@@ -578,15 +578,15 @@ pub mod pallet {
578578 AccountAuthorized { who : T :: AccountId , transactions : u32 , bytes : u64 } ,
579579 /// An authorization for account `who` was refreshed.
580580 AccountAuthorizationRefreshed { who : T :: AccountId } ,
581- /// Authorization was given for a preimage of `hash ` (not exceeding `max_size`) to be
582- /// stored by anyone.
583- PreimageAuthorized { hash : ContentHash , max_size : u64 } ,
584- /// An authorization for a preimage of `hash ` was refreshed.
585- PreimageAuthorizationRefreshed { hash : ContentHash } ,
581+ /// Authorization was given for a preimage of `content_hash ` (not exceeding `max_size`) to
582+ /// be stored by anyone.
583+ PreimageAuthorized { content_hash : ContentHash , max_size : u64 } ,
584+ /// An authorization for a preimage of `content_hash ` was refreshed.
585+ PreimageAuthorizationRefreshed { content_hash : ContentHash } ,
586586 /// An expired account authorization was removed.
587587 ExpiredAccountAuthorizationRemoved { who : T :: AccountId } ,
588588 /// An expired preimage authorization was removed.
589- ExpiredPreimageAuthorizationRemoved { hash : ContentHash } ,
589+ ExpiredPreimageAuthorizationRemoved { content_hash : ContentHash } ,
590590 }
591591
592592 /// Authorizations, keyed by scope.
@@ -753,7 +753,7 @@ pub mod pallet {
753753 // In the case of a regular unsigned transaction, pre_dispatch should have checked that
754754 // the authorization exists and has expired
755755 let Some ( authorization) = Authorizations :: < T > :: take ( & scope) else {
756- return Err ( Error :: < T > :: AuthorizationNotFound . into ( ) )
756+ return Err ( Error :: < T > :: AuthorizationNotFound . into ( ) ) ;
757757 } ;
758758 ensure ! ( Self :: expired( authorization. expiration) , Error :: <T >:: AuthorizationNotExpired ) ;
759759 Self :: authorization_removed ( & scope) ;
@@ -762,7 +762,7 @@ pub mod pallet {
762762
763763 fn authorization_extent ( scope : AuthorizationScopeFor < T > ) -> AuthorizationExtent {
764764 let Some ( authorization) = Authorizations :: < T > :: get ( & scope) else {
765- return AuthorizationExtent { transactions : 0 , bytes : 0 }
765+ return AuthorizationExtent { transactions : 0 , bytes : 0 } ;
766766 } ;
767767 if Self :: expired ( authorization. expiration ) {
768768 AuthorizationExtent { transactions : 0 , bytes : 0 }
@@ -880,7 +880,7 @@ pub mod pallet {
880880 scope : AuthorizationScopeFor < T > ,
881881 ) -> Result < ( ) , TransactionValidityError > {
882882 let Some ( authorization) = Authorizations :: < T > :: get ( & scope) else {
883- return Err ( AUTHORIZATION_NOT_FOUND . into ( ) )
883+ return Err ( AUTHORIZATION_NOT_FOUND . into ( ) ) ;
884884 } ;
885885 if Self :: expired ( authorization. expiration ) {
886886 Ok ( ( ) )
@@ -895,11 +895,11 @@ pub mod pallet {
895895 context : CheckContext ,
896896 ) -> Result < Option < ValidTransaction > , TransactionValidityError > {
897897 if !Self :: data_size_ok ( size) {
898- return Err ( BAD_DATA_SIZE . into ( ) )
898+ return Err ( BAD_DATA_SIZE . into ( ) ) ;
899899 }
900900
901901 if Self :: block_transactions_full ( ) {
902- return Err ( InvalidTransaction :: ExhaustsResources . into ( ) )
902+ return Err ( InvalidTransaction :: ExhaustsResources . into ( ) ) ;
903903 }
904904
905905 let hash = hash ( ) ;
@@ -949,13 +949,13 @@ pub mod pallet {
949949 . into ( )
950950 } ) )
951951 } ,
952- Call :: < T > :: remove_expired_preimage_authorization { hash } => {
953- Self :: check_authorization_expired ( AuthorizationScope :: Preimage ( * hash ) ) ?;
952+ Call :: < T > :: remove_expired_preimage_authorization { content_hash } => {
953+ Self :: check_authorization_expired ( AuthorizationScope :: Preimage ( * content_hash ) ) ?;
954954 Ok ( context. want_valid_transaction ( ) . then ( || {
955955 ValidTransaction :: with_tag_prefix (
956956 "TransactionStorageRemoveExpiredPreimageAuthorization" ,
957957 )
958- . and_provides ( hash )
958+ . and_provides ( content_hash )
959959 . priority ( T :: RemoveExpiredAuthorizationPriority :: get ( ) )
960960 . longevity ( T :: RemoveExpiredAuthorizationLongevity :: get ( ) )
961961 . into ( )
@@ -980,11 +980,11 @@ pub mod pallet {
980980 } ;
981981
982982 if !Self :: data_size_ok ( size) {
983- return Err ( BAD_DATA_SIZE . into ( ) )
983+ return Err ( BAD_DATA_SIZE . into ( ) ) ;
984984 }
985985
986986 if Self :: block_transactions_full ( ) {
987- return Err ( InvalidTransaction :: ExhaustsResources . into ( ) )
987+ return Err ( InvalidTransaction :: ExhaustsResources . into ( ) ) ;
988988 }
989989
990990 Self :: check_authorization (
0 commit comments