@@ -149,7 +149,7 @@ impl Worker {
149149 let gen_fut = self . get_block_chain ( 0 , -confirm_superblock_period) ;
150150 let gen_res: Vec < ChainEntry > = futures:: executor:: block_on ( gen_fut) ?;
151151 let gen_entry = gen_res
152- . get ( 0 )
152+ . first ( )
153153 . expect ( "It should always found a superconsolidated block" ) ;
154154 let get_gen_future = self . get_block ( gen_entry. 1 . clone ( ) ) ;
155155 let ( block, _confirmed) = futures:: executor:: block_on ( get_gen_future) ?;
@@ -173,7 +173,7 @@ impl Worker {
173173 2 ,
174174 ) ;
175175 let gen_res: Vec < ChainEntry > = futures:: executor:: block_on ( gen_fut) ?;
176- let gen_entry = gen_res. get ( 0 ) . expect (
176+ let gen_entry = gen_res. first ( ) . expect (
177177 "It should always find a last consolidated block for a any epoch number" ,
178178 ) ;
179179 let get_gen_future = self . get_block ( gen_entry. 1 . clone ( ) ) ;
@@ -771,7 +771,7 @@ impl Worker {
771771 let gen_fut = self . get_block_chain ( 0 , 1 ) ;
772772 let gen_res: Vec < ChainEntry > = futures:: executor:: block_on ( gen_fut) ?;
773773 let gen_entry = gen_res
774- . get ( 0 )
774+ . first ( )
775775 . expect ( "A Witnet chain should always have a genesis block" ) ;
776776
777777 let get_gen_future = self . get_block ( gen_entry. 1 . clone ( ) ) ;
@@ -794,7 +794,7 @@ impl Worker {
794794 let tip_res: Vec < ChainEntry > = futures:: executor:: block_on ( tip_fut) ?;
795795 let tip = CheckpointBeacon :: try_from (
796796 tip_res
797- . get ( 0 )
797+ . first ( )
798798 . expect ( "A Witnet chain should always have at least one block" ) ,
799799 )
800800 . expect ( "A Witnet node should present block hashes as 64 hexadecimal characters" ) ;
0 commit comments