@@ -186,7 +186,7 @@ impl<S: InboundLaneStorage> InboundLane<S> {
186186 relayer_at_bridged_chain : & S :: Relayer ,
187187 nonce : MessageNonce ,
188188 message_data : DispatchMessageData < Dispatch :: DispatchPayload > ,
189- relayer_reward_per_message : RelayerRewardAtSource ,
189+ relayer_reward_per_message : Option < RelayerRewardAtSource > ,
190190 ) -> ReceivalResult < Dispatch :: DispatchLevelResult > {
191191 let mut data = self . storage . data ( ) ;
192192 if Some ( nonce) != data. last_delivered_nonce ( ) . checked_add ( 1 ) {
@@ -251,7 +251,7 @@ mod tests {
251251 & TEST_RELAYER_A ,
252252 nonce,
253253 inbound_message_data( REGULAR_PAYLOAD ) ,
254- RELAYER_REWARD_PER_MESSAGE ,
254+ Some ( RELAYER_REWARD_PER_MESSAGE ) ,
255255 ) ,
256256 ReceivalResult :: Dispatched ( dispatch_result( 0 ) )
257257 ) ;
@@ -379,7 +379,7 @@ mod tests {
379379 & TEST_RELAYER_A ,
380380 10 ,
381381 inbound_message_data( REGULAR_PAYLOAD ) ,
382- RELAYER_REWARD_PER_MESSAGE ,
382+ Some ( RELAYER_REWARD_PER_MESSAGE ) ,
383383 ) ,
384384 ReceivalResult :: InvalidNonce
385385 ) ;
@@ -398,7 +398,7 @@ mod tests {
398398 & ( TEST_RELAYER_A + current_nonce) ,
399399 current_nonce,
400400 inbound_message_data( REGULAR_PAYLOAD ) ,
401- RELAYER_REWARD_PER_MESSAGE ,
401+ Some ( RELAYER_REWARD_PER_MESSAGE ) ,
402402 ) ,
403403 ReceivalResult :: Dispatched ( dispatch_result( 0 ) )
404404 ) ;
@@ -409,7 +409,7 @@ mod tests {
409409 & ( TEST_RELAYER_A + max_nonce + 1 ) ,
410410 max_nonce + 1 ,
411411 inbound_message_data( REGULAR_PAYLOAD ) ,
412- RELAYER_REWARD_PER_MESSAGE ,
412+ Some ( RELAYER_REWARD_PER_MESSAGE ) ,
413413 ) ,
414414 ReceivalResult :: TooManyUnrewardedRelayers ,
415415 ) ;
@@ -419,7 +419,7 @@ mod tests {
419419 & ( TEST_RELAYER_A + max_nonce) ,
420420 max_nonce + 1 ,
421421 inbound_message_data( REGULAR_PAYLOAD ) ,
422- RELAYER_REWARD_PER_MESSAGE ,
422+ Some ( RELAYER_REWARD_PER_MESSAGE ) ,
423423 ) ,
424424 ReceivalResult :: TooManyUnrewardedRelayers ,
425425 ) ;
@@ -437,7 +437,7 @@ mod tests {
437437 & TEST_RELAYER_A ,
438438 current_nonce,
439439 inbound_message_data( REGULAR_PAYLOAD ) ,
440- RELAYER_REWARD_PER_MESSAGE ,
440+ Some ( RELAYER_REWARD_PER_MESSAGE ) ,
441441 ) ,
442442 ReceivalResult :: Dispatched ( dispatch_result( 0 ) )
443443 ) ;
@@ -448,7 +448,7 @@ mod tests {
448448 & TEST_RELAYER_B ,
449449 max_nonce + 1 ,
450450 inbound_message_data( REGULAR_PAYLOAD ) ,
451- RELAYER_REWARD_PER_MESSAGE ,
451+ Some ( RELAYER_REWARD_PER_MESSAGE ) ,
452452 ) ,
453453 ReceivalResult :: TooManyUnconfirmedMessages ,
454454 ) ;
@@ -458,7 +458,7 @@ mod tests {
458458 & TEST_RELAYER_A ,
459459 max_nonce + 1 ,
460460 inbound_message_data( REGULAR_PAYLOAD ) ,
461- RELAYER_REWARD_PER_MESSAGE ,
461+ Some ( RELAYER_REWARD_PER_MESSAGE ) ,
462462 ) ,
463463 ReceivalResult :: TooManyUnconfirmedMessages ,
464464 ) ;
@@ -474,7 +474,7 @@ mod tests {
474474 & TEST_RELAYER_A ,
475475 1 ,
476476 inbound_message_data( REGULAR_PAYLOAD ) ,
477- RELAYER_REWARD_PER_MESSAGE ,
477+ Some ( RELAYER_REWARD_PER_MESSAGE ) ,
478478 ) ,
479479 ReceivalResult :: Dispatched ( dispatch_result( 0 ) )
480480 ) ;
@@ -483,7 +483,7 @@ mod tests {
483483 & TEST_RELAYER_B ,
484484 2 ,
485485 inbound_message_data( REGULAR_PAYLOAD ) ,
486- RELAYER_REWARD_PER_MESSAGE ,
486+ Some ( RELAYER_REWARD_PER_MESSAGE ) ,
487487 ) ,
488488 ReceivalResult :: Dispatched ( dispatch_result( 0 ) )
489489 ) ;
@@ -492,7 +492,7 @@ mod tests {
492492 & TEST_RELAYER_A ,
493493 3 ,
494494 inbound_message_data( REGULAR_PAYLOAD ) ,
495- RELAYER_REWARD_PER_MESSAGE ,
495+ Some ( RELAYER_REWARD_PER_MESSAGE ) ,
496496 ) ,
497497 ReceivalResult :: Dispatched ( dispatch_result( 0 ) )
498498 ) ;
@@ -516,7 +516,7 @@ mod tests {
516516 & TEST_RELAYER_A ,
517517 1 ,
518518 inbound_message_data( REGULAR_PAYLOAD ) ,
519- RELAYER_REWARD_PER_MESSAGE ,
519+ Some ( RELAYER_REWARD_PER_MESSAGE ) ,
520520 ) ,
521521 ReceivalResult :: Dispatched ( dispatch_result( 0 ) )
522522 ) ;
@@ -525,7 +525,7 @@ mod tests {
525525 & TEST_RELAYER_A ,
526526 2 ,
527527 inbound_message_data( REGULAR_PAYLOAD ) ,
528- RELAYER_REWARD_PER_MESSAGE + 1 ,
528+ Some ( RELAYER_REWARD_PER_MESSAGE + 1 ) ,
529529 ) ,
530530 ReceivalResult :: Dispatched ( dispatch_result( 0 ) )
531531 ) ;
@@ -534,15 +534,15 @@ mod tests {
534534 & TEST_RELAYER_A ,
535535 3 ,
536536 inbound_message_data( REGULAR_PAYLOAD ) ,
537- RELAYER_REWARD_PER_MESSAGE + 1 ,
537+ Some ( RELAYER_REWARD_PER_MESSAGE + 1 ) ,
538538 ) ,
539539 ReceivalResult :: Dispatched ( dispatch_result( 0 ) )
540540 ) ;
541541
542542 let mut unrewarded_relayer_with_larger_reward =
543543 unrewarded_relayer ( 2 , 3 , TEST_RELAYER_A ) ;
544544 unrewarded_relayer_with_larger_reward. messages . relayer_reward_per_message =
545- RELAYER_REWARD_PER_MESSAGE + 1 ;
545+ Some ( RELAYER_REWARD_PER_MESSAGE + 1 ) ;
546546 assert_eq ! (
547547 lane. storage. data( ) . relayers,
548548 vec![
@@ -562,7 +562,7 @@ mod tests {
562562 & TEST_RELAYER_A ,
563563 1 ,
564564 inbound_message_data( REGULAR_PAYLOAD ) ,
565- RELAYER_REWARD_PER_MESSAGE ,
565+ Some ( RELAYER_REWARD_PER_MESSAGE ) ,
566566 ) ,
567567 ReceivalResult :: Dispatched ( dispatch_result( 0 ) )
568568 ) ;
@@ -571,7 +571,7 @@ mod tests {
571571 & TEST_RELAYER_B ,
572572 1 ,
573573 inbound_message_data( REGULAR_PAYLOAD ) ,
574- RELAYER_REWARD_PER_MESSAGE ,
574+ Some ( RELAYER_REWARD_PER_MESSAGE ) ,
575575 ) ,
576576 ReceivalResult :: InvalidNonce ,
577577 ) ;
@@ -598,7 +598,7 @@ mod tests {
598598 & TEST_RELAYER_A ,
599599 1 ,
600600 inbound_message_data( payload) ,
601- RELAYER_REWARD_PER_MESSAGE ,
601+ Some ( RELAYER_REWARD_PER_MESSAGE ) ,
602602 ) ,
603603 ReceivalResult :: Dispatched ( dispatch_result( 1 ) )
604604 ) ;
0 commit comments