Skip to content

Commit

Permalink
Fixed errors
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Baltariu <[email protected]>
  • Loading branch information
andreiblt1304 committed Jan 17, 2025
1 parent 10615ee commit 999e4a1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions header-verifier/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ pub trait Headerverifier: setup_phase::SetupPhaseModule {
fn change_validator_set(&self, bls_pub_keys: MultiValueEncoded<ManagedBuffer>) {
// TODO: verify signature

self.check_validator_range(bls_pub_keys.len() as u64, self.chain_config_address().get());
self.check_validator_range(bls_pub_keys.len() as u64);

self.bls_pub_keys().clear();
self.bls_pub_keys().extend(bls_pub_keys);
Expand All @@ -132,13 +132,12 @@ pub trait Headerverifier: setup_phase::SetupPhaseModule {
return;
}

let chain_config_mapper = self.chain_config_address();
require!(
!chain_config_mapper.is_empty(),
!self.chain_config_address().is_empty(),
"The Chain-Config address is not set"
);

self.check_validator_range(self.bls_pub_keys().len() as u64, chain_config_mapper.get());
self.check_validator_range(self.bls_pub_keys().len() as u64);

// TODO:
// self.tx()
Expand Down

0 comments on commit 999e4a1

Please sign in to comment.