message: refactor: check if the parent chain root of a genesis block is the default value
diff: @@ -65,6 +65,11 @@ impl packed::Header {
  }
  impl packed::HeaderDigest {
  + fn is_default(&self) -> bool {
  + let default = Self::default();
  + self.as_slice() == default.as_slice()
  + }
  +
  /// Verify the MMR header digest
  pub fn verify(&self) -> Result<(), String> {
  // 1. Check block numbers.
  @@ -216,9 +221,13 @@ impl VerifiableHeader {
  /// Checks if the current verifiable header is valid.
  pub fn is_valid(&self, mmr_activated_epoch: EpochNumber) -> bool {
  - let has_chain_root =
  - !self.header().is_genesis() && self.header().epoch().number() >= mmr_activated_epoch;
  + let has_chain_root = self.header().epoch().number() >= mmr_activated_epoch;
  if has_chain_root {
  + if self.header().is_genesis() {
  + if !self.parent_chain_root().is_default() {
  + return false;
  + }
  + } else {
  let is_extension_beginning_with_chain_root_hash = self
  .extension()
  .map(|extension| {
  @@ -231,6 +240,7 @@ impl VerifiableHeader {
  return false;
  }
  }
  + }
  let expected_extension_hash = self
  .extension()
  