File tree 2 files changed +17
-1
lines changed
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -150,5 +150,14 @@ mod events {
150
150
<T as frame_system:: Config >:: AccountId ,
151
151
> >:: Balance ,
152
152
} ,
153
+ /// A coldkey swap has been scheduled
154
+ ColdkeySwapScheduled {
155
+ /// The account ID of the old coldkey
156
+ old_coldkey : T :: AccountId ,
157
+ /// The account ID of the new coldkey
158
+ new_coldkey : T :: AccountId ,
159
+ /// The arbitration block for the coldkey swap
160
+ arbitration_block : u64 ,
161
+ } ,
153
162
}
154
163
}
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ impl<T: Config> Pallet<T> {
204
204
///
205
205
/// # Arguments
206
206
///
207
- /// * `origin ` - The origin of the call, which must be signed by the old coldkey.
207
+ /// * `old_coldkey ` - The account ID of the old coldkey.
208
208
/// * `new_coldkey` - The account ID of the new coldkey.
209
209
/// * `work` - The proof of work submitted by the caller.
210
210
/// * `block_number` - The block number at which the work was performed.
@@ -289,6 +289,13 @@ impl<T: Config> Pallet<T> {
289
289
ColdkeysToSwapAtBlock :: < T > :: insert ( arbitration_block, key_to_arbitrate_on_this_block) ;
290
290
}
291
291
292
+ // Emit an event indicating that a coldkey swap has been scheduled
293
+ Self :: deposit_event ( Event :: ColdkeySwapScheduled {
294
+ old_coldkey : old_coldkey. clone ( ) ,
295
+ new_coldkey : new_coldkey. clone ( ) ,
296
+ arbitration_block : ColdkeyArbitrationBlock :: < T > :: get ( old_coldkey) ,
297
+ } ) ;
298
+
292
299
Ok ( ( ) )
293
300
}
294
301
You can’t perform that action at this time.
0 commit comments