@@ -398,7 +398,7 @@ pub mod pallet {
398398
399399 Self :: deposit_event ( Event :: MessagesReceived ( messages_received_status) ) ;
400400
401- Ok ( PostDispatchInfo { actual_weight : Some ( actual_weight) , pays_fee : Pays :: No } )
401+ Ok ( PostDispatchInfo { actual_weight : Some ( actual_weight) , pays_fee : Pays :: Yes } )
402402 }
403403
404404 /// Receive messages delivery proof from bridged chain.
@@ -899,6 +899,7 @@ mod tests {
899899 use bp_test_utils:: generate_owned_bridge_module_tests;
900900 use frame_support:: {
901901 assert_noop, assert_ok,
902+ dispatch:: Pays ,
902903 storage:: generator:: { StorageMap , StorageValue } ,
903904 traits:: Hooks ,
904905 weights:: Weight ,
@@ -1543,16 +1544,19 @@ mod tests {
15431544 messages_count,
15441545 REGULAR_PAYLOAD . declared_weight ,
15451546 ) ;
1546- let post_dispatch_weight = Pallet :: < TestRuntime > :: receive_messages_proof (
1547+ let result = Pallet :: < TestRuntime > :: receive_messages_proof (
15471548 RuntimeOrigin :: signed ( 1 ) ,
15481549 TEST_RELAYER_A ,
15491550 proof,
15501551 messages_count,
15511552 REGULAR_PAYLOAD . declared_weight ,
15521553 )
1553- . expect ( "delivery has failed" )
1554- . actual_weight
1555- . expect ( "receive_messages_proof always returns Some" ) ;
1554+ . expect ( "delivery has failed" ) ;
1555+ let post_dispatch_weight =
1556+ result. actual_weight . expect ( "receive_messages_proof always returns Some" ) ;
1557+
1558+ // message delivery transactions are never free
1559+ assert_eq ! ( result. pays_fee, Pays :: Yes ) ;
15561560
15571561 ( pre_dispatch_weight, post_dispatch_weight)
15581562 }
0 commit comments