Skip to content

Commit

Permalink
Remove unused params
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiEres committed Mar 5, 2024
1 parent 727448a commit a67d1e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 0 additions & 4 deletions parachain-tracer/src/parachain_block_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ use subxt::config::{substrate::BlakeTwo256, Hasher};
pub struct ParachainBlockInfo {
/// Candidate hash
pub candidate_hash: Option<H256>,
/// Relay block number on which the candidate was backed
pub backed_at: Option<u32>,
/// Relay block number on which the candidate was included
pub included_at: Option<u32>,
/// The number of signed bitfields.
pub bitfield_count: u32,
/// The maximum expected number of availability bits that can be set. Corresponds to `max_validators`.
Expand Down
6 changes: 2 additions & 4 deletions parachain-tracer/src/tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,7 @@ impl SubxtTracker {
for candidate in self.candidates.iter_mut() {
if let Some(candidate_hash) = candidate.candidate_hash {
if let Some(stored_candidate) = storage.candidate(candidate_hash).await {
candidate.backed_at = Some(stored_candidate.candidate_inclusion.backed);
candidate.included_at = stored_candidate.candidate_inclusion.included;
if candidate.included_at.is_some() {
if stored_candidate.candidate_inclusion.included.is_some() {
candidate.set_included();
last_included = candidate.candidate_hash;
}
Expand Down Expand Up @@ -521,7 +519,7 @@ impl SubxtTracker {
}

fn has_backed_candidate(&self) -> bool {
self.candidates.iter().any(|candidate| candidate.backed_at.is_some()) ||
self.candidates.iter().any(|candidate| candidate.candidate_hash.is_some()) ||
self.relay_forks
.iter()
.any(|fork| fork.backed_candidate.is_some() || fork.included_candidate.is_some())
Expand Down

0 comments on commit a67d1e1

Please sign in to comment.