mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 21:01:05 +00:00
disputes: fix relay chain selection sanity check (#3750)
* Fix off-by-one bug in approval voting and adjust tests * Address feedback * Remove default disputes * Remove spaces * cargo +nightly fmt Co-authored-by: Lldenaurois <Ljdenaurois@gmail.com> Co-authored-by: Andronik Ordian <write@reusable.software>
This commit is contained in:
committed by
GitHub
parent
16e4c8bc28
commit
b85586619f
@@ -1239,6 +1239,15 @@ async fn handle_approved_ancestor(
|
||||
// ancestry is moving backwards.
|
||||
all_approved_max = Some((block_hash, target_number - i as BlockNumber));
|
||||
}
|
||||
block_descriptions.push(BlockDescription {
|
||||
block_hash,
|
||||
session: entry.session(),
|
||||
candidates: entry
|
||||
.candidates()
|
||||
.iter()
|
||||
.map(|(_idx, candidate_hash)| *candidate_hash)
|
||||
.collect(),
|
||||
});
|
||||
} else if bits.len() <= ABNORMAL_DEPTH_THRESHOLD {
|
||||
all_approved_max = None;
|
||||
block_descriptions.clear();
|
||||
@@ -1321,15 +1330,6 @@ async fn handle_approved_ancestor(
|
||||
}
|
||||
}
|
||||
}
|
||||
block_descriptions.push(BlockDescription {
|
||||
block_hash,
|
||||
session: entry.session(),
|
||||
candidates: entry
|
||||
.candidates()
|
||||
.iter()
|
||||
.map(|(_idx, candidate_hash)| *candidate_hash)
|
||||
.collect(),
|
||||
});
|
||||
}
|
||||
|
||||
tracing::trace!(
|
||||
|
||||
Reference in New Issue
Block a user