@@ -53,12 +53,11 @@ use codec::{Encode, Decode};
53
53
use sp_runtime:: { DispatchResult , RuntimeDebug , traits:: {
54
54
StaticLookup , Zero , AtLeast32Bit , MaybeSerializeDeserialize , Convert
55
55
} } ;
56
- use frame_support:: { decl_module, decl_event, decl_storage, decl_error, ensure} ;
56
+ use frame_support:: { decl_module, decl_event, decl_storage, decl_error, ensure, IterableStorageMap } ;
57
57
use frame_support:: traits:: {
58
58
Currency , LockableCurrency , VestingSchedule , WithdrawReason , LockIdentifier ,
59
59
ExistenceRequirement , Get
60
60
} ;
61
-
62
61
use frame_system:: { self as system, ensure_signed} ;
63
62
64
63
mod benchmarking;
@@ -182,6 +181,13 @@ decl_module! {
182
181
183
182
fn deposit_event( ) = default ;
184
183
184
+ fn on_runtime_upgrade( ) -> frame_support:: dispatch:: Weight {
185
+ for ( a, _) in Vesting :: <T >:: iter( ) {
186
+ let _ = Self :: update_lock( a) ;
187
+ }
188
+ 1_000_000_000_000
189
+ }
190
+
185
191
/// Unlock any vested funds of the sender account.
186
192
///
187
193
/// The dispatch origin for this call must be _Signed_ and the sender must have funds still
0 commit comments