@@ -2145,17 +2145,19 @@ mod test_finalize_block {
21452145 . unwrap ( )
21462146 . unwrap ( ) ;
21472147 let hash_string = tm_consensus_key_raw_hash ( & ck) ;
2148- HEXUPPER . decode ( hash_string. as_bytes ( ) ) . unwrap ( )
2148+ let decoded = HEXUPPER . decode ( hash_string. as_bytes ( ) ) . unwrap ( ) ;
2149+ TryFrom :: try_from ( decoded) . unwrap ( )
21492150 } ;
21502151
21512152 let pkh1 = get_pkh ( validator. address . clone ( ) , Epoch :: default ( ) ) ;
21522153 let votes = vec ! [ VoteInfo {
2153- validator: Some ( Validator {
2154- address: pkh1. clone( ) . into( ) ,
2155- power: u128 :: try_from( validator. bonded_stake)
2156- . expect( "Test failed" ) as i64 ,
2157- } ) ,
2158- signed_last_block: true ,
2154+ validator: Validator {
2155+ address: pkh1,
2156+ power: ( u128 :: try_from( validator. bonded_stake) . unwrap( ) as u64 )
2157+ . try_into( )
2158+ . unwrap( ) ,
2159+ } ,
2160+ sig_info: tendermint:: abci:: types:: BlockSignatureInfo :: LegacySigned ,
21592161 } ] ;
21602162 // let rewards_prod_1 =
21612163 // validator_rewards_products_handle(&val1.address);
@@ -2180,7 +2182,7 @@ mod test_finalize_block {
21802182 // FINALIZE BLOCK 1. Tell Namada that val1 is the block proposer. We
21812183 // won't receive votes from TM since we receive votes at a 1-block
21822184 // delay, so votes will be empty here
2183- next_block_for_inflation ( & mut shell, pkh1. clone ( ) , vec ! [ ] , None ) ;
2185+ next_block_for_inflation ( & mut shell, pkh1. to_vec ( ) , vec ! [ ] , None ) ;
21842186 assert ! (
21852187 rewards_accumulator_handle( )
21862188 . is_empty( & shell. wl_storage)
@@ -2203,7 +2205,12 @@ mod test_finalize_block {
22032205 assert ! ( is_reward_equal_enough( total_rewards, total_claimed, 1 ) ) ;
22042206
22052207 // Try a claim the next block and ensure we get 0 tokens back
2206- next_block_for_inflation ( & mut shell, pkh1. clone ( ) , votes. clone ( ) , None ) ;
2208+ next_block_for_inflation (
2209+ & mut shell,
2210+ pkh1. to_vec ( ) ,
2211+ votes. clone ( ) ,
2212+ None ,
2213+ ) ;
22072214 let att = namada_proof_of_stake:: claim_reward_tokens (
22082215 & mut shell. wl_storage ,
22092216 None ,
0 commit comments