This repository was archived by the owner on Feb 21, 2024. It is now read-only.
File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -109,14 +109,15 @@ mod pallet {
109
109
}
110
110
111
111
// TODO: add proper weights
112
+ // TODO: For now we don't have fees, but we will have them in the future
112
113
/// Put a new object into a feed
113
- #[ pallet:: weight( 10_000 ) ]
114
+ #[ pallet:: weight( ( 10_000 , Pays :: No ) ) ]
114
115
pub fn put (
115
116
origin : OriginFor < T > ,
116
117
feed_id : FeedId ,
117
118
data : PutDataObject ,
118
119
metadata : ObjectMetadata ,
119
- ) -> DispatchResultWithPostInfo {
120
+ ) -> DispatchResult {
120
121
let who = ensure_signed ( origin) ?;
121
122
122
123
let object_size = data. len ( ) as u64 ;
@@ -137,8 +138,7 @@ mod pallet {
137
138
138
139
Self :: deposit_event ( Event :: DataSubmitted ( metadata, who, object_size) ) ;
139
140
140
- // TODO: For now we don't have fees, but we will have them in the future
141
- Ok ( Pays :: No . into ( ) )
141
+ Ok ( ( ) )
142
142
}
143
143
}
144
144
}
Original file line number Diff line number Diff line change @@ -442,7 +442,7 @@ pub mod pallet {
442
442
/// This extrinsic must be called unsigned and it is expected that only block authors will
443
443
/// call it (validated in `ValidateUnsigned`), as such if the block author is defined it
444
444
/// will be defined as the equivocation reporter.
445
- #[ pallet:: weight( <T as Config >:: WeightInfo :: report_equivocation( ) ) ]
445
+ #[ pallet:: weight( ( <T as Config >:: WeightInfo :: report_equivocation( ) , DispatchClass :: Operational ) ) ]
446
446
// Suppression because the custom syntax will also generate an enum and we need enum to have
447
447
// boxed value.
448
448
#[ allow( clippy:: boxed_local) ]
@@ -474,7 +474,7 @@ pub mod pallet {
474
474
///
475
475
/// This extrinsic must be called unsigned and it is expected that only block authors will
476
476
/// call it (validated in `ValidateUnsigned`).
477
- #[ pallet:: weight( <T as Config >:: WeightInfo :: store_root_block( ) ) ]
477
+ #[ pallet:: weight( ( <T as Config >:: WeightInfo :: store_root_block( ) , DispatchClass :: Mandatory , Pays :: No ) ) ]
478
478
pub fn store_root_block (
479
479
origin : OriginFor < T > ,
480
480
root_block : RootBlock ,
You can’t perform that action at this time.
0 commit comments