File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -2685,10 +2685,12 @@ fn evm_priority_overrides_tip_to_base() {
26852685 let signer = H160 :: repeat_byte ( 1 ) ;
26862686 adjust_evm_priority_and_warn ( & mut validity, Some ( U256 :: from ( 10 ) ) , & signer) ;
26872687
2688- let adjusted = validity
2689- . expect ( "validity must exist" )
2690- . expect ( "must be valid" ) ;
2691- assert_eq ! ( adjusted. priority, EVM_TRANSACTION_BASE_PRIORITY ) ;
2688+ let adjusted_priority = validity
2689+ . as_ref ( )
2690+ . and_then ( |v| v. as_ref ( ) . ok ( ) )
2691+ . map ( |v| v. priority ) ;
2692+
2693+ assert_eq ! ( adjusted_priority, Some ( EVM_TRANSACTION_BASE_PRIORITY ) ) ;
26922694}
26932695
26942696#[ test]
@@ -2707,11 +2709,12 @@ fn evm_priority_cannot_overtake_unstake() {
27072709 ] ;
27082710
27092711 queue. sort_by ( |a, b| {
2710- b. 1 . cmp ( & a. 1 ) // higher priority first
2711- . then_with ( || a. 2 . cmp ( & b. 2 ) ) // earlier arrival first when equal
2712+ b. 1 . cmp ( & a. 1 ) // higher priority first
2713+ . then_with ( || a. 2 . cmp ( & b. 2 ) ) // earlier arrival first when equal
27122714 } ) ;
27132715
2714- assert_eq ! ( queue[ 0 ] . 0 , "unstake" ) ;
2716+ let first = queue. first ( ) . map ( |entry| entry. 0 ) ;
2717+ assert_eq ! ( first, Some ( "unstake" ) ) ;
27152718}
27162719
27172720#[ test]
You can’t perform that action at this time.
0 commit comments