@@ -16,7 +16,6 @@ use std::{
16
16
sync:: Arc ,
17
17
vec:: Vec ,
18
18
} ;
19
- use zenith_types:: Zenith ;
20
19
21
20
type Result < T , E = JournalDecodeError > = core:: result:: Result < T , E > ;
22
21
@@ -41,7 +40,6 @@ const TAG_OPTION_NONE: u8 = 0;
41
40
const TAG_OPTION_SOME : u8 = 1 ;
42
41
43
42
// Sizes
44
- const ZENITH_HEADER_BYTES : usize = 32 + 32 + 32 + 20 + 32 ;
45
43
const ACCOUNT_INFO_BYTES : usize = 8 + 32 + 32 ;
46
44
const INFO_OUTCOME_MIN_BYTES : usize = 1 + ACCOUNT_INFO_BYTES ;
47
45
const ACCT_DIFF_MIN_BYTES : usize = 4 + INFO_OUTCOME_MIN_BYTES ;
@@ -413,22 +411,6 @@ impl JournalEncode for BundleState {
413
411
}
414
412
}
415
413
416
- impl JournalEncode for Zenith :: BlockHeader {
417
- fn serialized_size ( & self ) -> usize {
418
- ZENITH_HEADER_BYTES
419
- }
420
-
421
- fn encode ( & self , buf : & mut dyn BufMut ) {
422
- let Self { rollupChainId, hostBlockNumber, gasLimit, rewardAddress, blockDataHash } = self ;
423
-
424
- rollupChainId. encode ( buf) ;
425
- hostBlockNumber. encode ( buf) ;
426
- gasLimit. encode ( buf) ;
427
- rewardAddress. encode ( buf) ;
428
- blockDataHash. encode ( buf) ;
429
- }
430
- }
431
-
432
414
/// Trait for decoding journal types from a buffer.
433
415
pub trait JournalDecode : JournalEncode + Sized + ' static {
434
416
/// Decode the type from the buffer.
@@ -638,18 +620,6 @@ impl JournalDecode for BundleState {
638
620
}
639
621
}
640
622
641
- impl JournalDecode for Zenith :: BlockHeader {
642
- fn decode ( buf : & mut & [ u8 ] ) -> Result < Self > {
643
- Ok ( Self {
644
- rollupChainId : JournalDecode :: decode ( buf) ?,
645
- hostBlockNumber : JournalDecode :: decode ( buf) ?,
646
- gasLimit : JournalDecode :: decode ( buf) ?,
647
- rewardAddress : JournalDecode :: decode ( buf) ?,
648
- blockDataHash : JournalDecode :: decode ( buf) ?,
649
- } )
650
- }
651
- }
652
-
653
623
#[ cfg( test) ]
654
624
mod test {
655
625
use super :: * ;
@@ -748,13 +718,5 @@ mod test {
748
718
. collect ( ) ,
749
719
} ;
750
720
roundtrip ( & bsi) ;
751
-
752
- roundtrip ( & Zenith :: BlockHeader {
753
- rollupChainId : U256 :: from ( 1 ) ,
754
- hostBlockNumber : U256 :: from ( 1 ) ,
755
- gasLimit : U256 :: from ( 1 ) ,
756
- rewardAddress : Address :: repeat_byte ( 0xa ) ,
757
- blockDataHash : B256 :: repeat_byte ( 0xa ) ,
758
- } ) ;
759
721
}
760
722
}
0 commit comments