File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ use frame_support::{
95
95
} ;
96
96
use frame_support:: {
97
97
weights:: { Weight , GetDispatchInfo , Pays } ,
98
- traits:: UnfilteredDispatchable ,
98
+ traits:: { UnfilteredDispatchable , Get } ,
99
99
dispatch:: DispatchResultWithPostInfo ,
100
100
} ;
101
101
use frame_system:: ensure_signed;
@@ -197,7 +197,13 @@ decl_module! {
197
197
/// - One DB write (event).
198
198
/// - Weight of derivative `call` execution + 10,000.
199
199
/// # </weight>
200
- #[ weight = ( call. get_dispatch_info( ) . weight + 10_000 , call. get_dispatch_info( ) . class) ]
200
+ #[ weight = (
201
+ call. get_dispatch_info( ) . weight
202
+ . saturating_add( 10_000 )
203
+ // AccountData for inner call origin accountdata.
204
+ . saturating_add( T :: DbWeight :: get( ) . reads_writes( 1 , 1 ) ) ,
205
+ call. get_dispatch_info( ) . class
206
+ ) ]
201
207
fn sudo_as( origin,
202
208
who: <T :: Lookup as StaticLookup >:: Source ,
203
209
call: Box <<T as Trait >:: Call >
You can’t perform that action at this time.
0 commit comments