@@ -329,7 +329,7 @@ pub mod pallet {
329329 } )
330330 . map_err ( |_| Error :: < T > :: TooManyTransactions )
331331 } ) ?;
332- Self :: deposit_event ( Event :: Stored { index } ) ;
332+ Self :: deposit_event ( Event :: Stored { index, hash : content_hash } ) ;
333333 Ok ( ( ) )
334334 }
335335
@@ -361,7 +361,8 @@ pub mod pallet {
361361
362362 let extrinsic_index =
363363 <frame_system:: Pallet < T > >:: extrinsic_index ( ) . ok_or ( Error :: < T > :: BadContext ) ?;
364- sp_io:: transaction_index:: renew ( extrinsic_index, info. content_hash . into ( ) ) ;
364+ let content_hash = info. content_hash . into ( ) ;
365+ sp_io:: transaction_index:: renew ( extrinsic_index, content_hash) ;
365366
366367 let mut index = 0 ;
367368 <BlockTransactions < T > >:: mutate ( |transactions| {
@@ -377,7 +378,7 @@ pub mod pallet {
377378 } )
378379 . map_err ( |_| Error :: < T > :: TooManyTransactions )
379380 } ) ?;
380- Self :: deposit_event ( Event :: Renewed { index } ) ;
381+ Self :: deposit_event ( Event :: Renewed { index, hash : content_hash } ) ;
381382 Ok ( ( ) . into ( ) )
382383 }
383384
@@ -558,9 +559,9 @@ pub mod pallet {
558559 #[ pallet:: generate_deposit( pub ( super ) fn deposit_event) ]
559560 pub enum Event < T : Config > {
560561 /// Stored data under specified index.
561- Stored { index : u32 } ,
562+ Stored { index : u32 , hash : ContentHash } ,
562563 /// Renewed data under specified index.
563- Renewed { index : u32 } ,
564+ Renewed { index : u32 , hash : ContentHash } ,
564565 /// Storage proof was successfully checked.
565566 ProofChecked ,
566567 /// An account `who` was authorized to store `bytes` bytes in `transactions` transactions.
0 commit comments