Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Leouarz committed Apr 10, 2024
1 parent 46a6bc3 commit 763ae9f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions core/src/header/extension/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,16 @@ impl HeaderExtension {
forward_to_version!(self, cols)
}

pub fn get_empty_header(&self, data_root: H256) -> HeaderExtension {
forward_to_version!(self, get_empty_header, data_root).into()
pub fn get_empty_header(data_root: H256, version: HeaderVersion) -> HeaderExtension {
match version {
HeaderVersion::V3 => v3::HeaderExtension::get_empty_header(data_root).into(),
}
}

pub fn get_faulty_header(&self, data_root: H256) -> HeaderExtension {
forward_to_version!(self, get_faulty_header, data_root).into()
pub fn get_faulty_header(data_root: H256, version: HeaderVersion) -> HeaderExtension {
match version {
HeaderVersion::V3 => v3::HeaderExtension::get_faulty_header(data_root).into(),
}
}

pub fn get_header_version(&self) -> HeaderVersion {
Expand Down
4 changes: 2 additions & 2 deletions core/src/header/extension/v3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl HeaderExtension {
self.commitment.cols
}

pub fn get_empty_header(&self, data_root: H256) -> Self {
pub fn get_empty_header(data_root: H256) -> Self {
let empty_commitment: Vec<u8> = vec![];
let empty_app_lookup = DataLookup::new_empty();
let commitment = KateCommitment::new(0, 0, data_root, empty_commitment);
Expand All @@ -41,7 +41,7 @@ impl HeaderExtension {
}
}

pub fn get_faulty_header(&self, data_root: H256) -> Self {
pub fn get_faulty_header(data_root: H256) -> Self {
let empty_commitment: Vec<u8> = vec![];
let error_app_lookup = DataLookup::new_error();
let commitment = KateCommitment::new(0, 0, data_root, empty_commitment);
Expand Down

0 comments on commit 763ae9f

Please sign in to comment.