Skip to content

Commit

Permalink
Merge pull request #2179 from dusk-network/fix_failed_attestations
Browse files Browse the repository at this point in the history
  • Loading branch information
herr-seppia authored Aug 22, 2024
2 parents 282c8d2 + 1ea1d7a commit 20a9006
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion node/src/chain/header_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,13 @@ impl<'a, DB: database::DB> Validator<'a, DB> {

anyhow::ensure!(pk == &expected_pk, "Invalid generator. Expected {expected_pk:?}, actual {pk:?}");

let mut consensus_header =
candidate_block.to_consensus_header();
consensus_header.iteration = iter as u8;

let (_, rat_quorum, _) = verify_att(
att,
candidate_block.to_consensus_header(),
consensus_header,
self.prev_header.seed,
self.provisioners.current(),
RatificationResult::Fail(Vote::default()),
Expand Down
2 changes: 1 addition & 1 deletion rusk/src/lib/node/rusk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ fn slash(session: &mut Session, slash: Vec<Slash>) -> Result<Vec<Event>> {
node_data::ledger::SlashType::Hard => session.call::<_, ()>(
STAKE_CONTRACT,
"hard_slash",
&(provisioner, None::<u64>, None::<u64>),
&(provisioner, None::<u64>, None::<u8>),
u64::MAX,
),
node_data::ledger::SlashType::HardWithSeverity(severity) => session
Expand Down

0 comments on commit 20a9006

Please sign in to comment.