@@ -36,6 +36,7 @@ use crate::{
3636 modules:: core:: API as _,
3737 runtime:: Runtime ,
3838 schedule_control:: ScheduleControlHost ,
39+ sender:: SenderMeta ,
3940 storage:: { self , NestedStore , Prefix } ,
4041 types,
4142 types:: transaction:: { AuthProof , Transaction } ,
@@ -77,6 +78,8 @@ pub struct DispatchResult {
7778 pub tags : Tags ,
7879 /// Transaction priority.
7980 pub priority : u64 ,
81+ /// Transaction sender metadata.
82+ pub sender_metadata : SenderMeta ,
8083 /// Call format metadata.
8184 pub call_format_metadata : callformat:: Metadata ,
8285}
@@ -91,6 +94,7 @@ impl DispatchResult {
9194 result,
9295 tags,
9396 priority : 0 ,
97+ sender_metadata : Default :: default ( ) ,
9498 call_format_metadata,
9599 }
96100 }
@@ -258,8 +262,10 @@ impl<R: Runtime> Dispatcher<R> {
258262 ) ;
259263 }
260264
261- // Load priority, weights .
265+ // Load priority.
262266 let priority = R :: Core :: take_priority ( & mut ctx) ;
267+ // Load sender metadata.
268+ let sender_metadata = R :: Core :: take_sender_meta ( & mut ctx) ;
263269
264270 if ctx. is_check_only ( ) {
265271 // Rollback state during checks.
@@ -270,6 +276,7 @@ impl<R: Runtime> Dispatcher<R> {
270276 result,
271277 tags : Vec :: new ( ) ,
272278 priority,
279+ sender_metadata,
273280 call_format_metadata,
274281 } ,
275282 Vec :: new ( ) ,
@@ -282,6 +289,7 @@ impl<R: Runtime> Dispatcher<R> {
282289 result,
283290 tags : etags. into_tags ( ) ,
284291 priority,
292+ sender_metadata,
285293 call_format_metadata,
286294 } ,
287295 messages,
@@ -338,9 +346,9 @@ impl<R: Runtime> Dispatcher<R> {
338346 error : Default :: default ( ) ,
339347 meta : Some ( CheckTxMetadata {
340348 priority : dispatch. priority ,
341- sender : vec ! [ ] , // TODO: Support indicating senders.
342- sender_seq : 0 , // TODO: Support indicating senders.
343- sender_state_seq : 0 , // TODO: Support indicating senders.
349+ sender : dispatch . sender_metadata . id ( ) ,
350+ sender_seq : dispatch . sender_metadata . tx_nonce ,
351+ sender_state_seq : dispatch . sender_metadata . state_nonce ,
344352 } ) ,
345353 } ) ,
346354
0 commit comments