@@ -16,7 +16,6 @@ use std::{
1616 sync:: Arc ,
1717 vec:: Vec ,
1818} ;
19- use zenith_types:: Zenith ;
2019
2120type Result < T , E = JournalDecodeError > = core:: result:: Result < T , E > ;
2221
@@ -41,7 +40,6 @@ const TAG_OPTION_NONE: u8 = 0;
4140const TAG_OPTION_SOME : u8 = 1 ;
4241
4342// Sizes
44- const ZENITH_HEADER_BYTES : usize = 32 + 32 + 32 + 20 + 32 ;
4543const ACCOUNT_INFO_BYTES : usize = 8 + 32 + 32 ;
4644const INFO_OUTCOME_MIN_BYTES : usize = 1 + ACCOUNT_INFO_BYTES ;
4745const ACCT_DIFF_MIN_BYTES : usize = 4 + INFO_OUTCOME_MIN_BYTES ;
@@ -413,22 +411,6 @@ impl JournalEncode for BundleState {
413411 }
414412}
415413
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-
432414/// Trait for decoding journal types from a buffer.
433415pub trait JournalDecode : JournalEncode + Sized + ' static {
434416 /// Decode the type from the buffer.
@@ -638,18 +620,6 @@ impl JournalDecode for BundleState {
638620 }
639621}
640622
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-
653623#[ cfg( test) ]
654624mod test {
655625 use super :: * ;
@@ -748,13 +718,5 @@ mod test {
748718 . collect ( ) ,
749719 } ;
750720 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- } ) ;
759721 }
760722}
0 commit comments