@@ -300,7 +300,7 @@ pub struct Web3Block {
300
300
pub number : U256 ,
301
301
pub gas_used : U256 ,
302
302
pub gas_limit : U256 ,
303
- pub extra_data : Vec < Hex > ,
303
+ pub extra_data : Hex ,
304
304
pub logs_bloom : Option < Bloom > ,
305
305
pub timestamp : U256 ,
306
306
pub difficulty : U256 ,
@@ -331,12 +331,7 @@ impl From<Block> for Web3Block {
331
331
total_difficulty : Some ( b. header . number . into ( ) ) ,
332
332
seal_fields : vec ! [ ] ,
333
333
base_fee_per_gas : b. header . base_fee_per_gas ,
334
- extra_data : b
335
- . header
336
- . extra_data
337
- . iter ( )
338
- . map ( |i| Hex :: encode ( & i. inner . encode ( ) . unwrap ( ) ) )
339
- . collect ( ) ,
334
+ extra_data : Hex :: encode ( rlp:: encode_list ( & b. header . extra_data ) ) ,
340
335
size : Some ( b. header . size ( ) . into ( ) ) ,
341
336
gas_limit : b. header . gas_limit ,
342
337
gas_used : b. header . gas_used ,
@@ -826,7 +821,7 @@ pub struct FeeHistoryEmpty {
826
821
#[ serde( rename_all = "camelCase" ) ]
827
822
pub struct Web3Header {
828
823
pub difficulty : U256 ,
829
- pub extra_data : Vec < Hex > ,
824
+ pub extra_data : Hex ,
830
825
pub gas_limit : U256 ,
831
826
pub gas_used : U256 ,
832
827
pub logs_bloom : Option < Bloom > ,
@@ -854,11 +849,7 @@ impl From<Header> for Web3Header {
854
849
receipts_root : h. receipts_root ,
855
850
miner : h. proposer ,
856
851
difficulty : U256 :: one ( ) ,
857
- extra_data : h
858
- . extra_data
859
- . into_iter ( )
860
- . map ( |i| Hex :: encode ( i. inner . encode ( ) . unwrap ( ) ) )
861
- . collect ( ) ,
852
+ extra_data : Hex :: encode ( rlp:: encode_list ( & h. extra_data ) ) ,
862
853
gas_limit : h. gas_limit ,
863
854
gas_used : h. gas_used ,
864
855
timestamp : h. timestamp . into ( ) ,
0 commit comments