Skip to content

Commit

Permalink
fix grandpa equivocation
Browse files Browse the repository at this point in the history
Signed-off-by: turuslan <[email protected]>
  • Loading branch information
turuslan committed Nov 21, 2024
1 parent b046ae5 commit 1981045
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/consensus/grandpa/impl/environment_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ namespace kagome::consensus::grandpa {
SL_WARN(logger_,
"Round #{}: can't submit equivocation report: {}",
equivocation.round(),
key_owner_proof_res.error());
submit_res.error());
return submit_res.as_failure();
}

Expand Down
6 changes: 4 additions & 2 deletions core/consensus/grandpa/types/equivocation_proof.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ namespace kagome::consensus::grandpa {
friend scale::ScaleEncoderStream &operator<<(
scale::ScaleEncoderStream &s, const Equivocation &equivocation) {
return s << equivocation.stage << equivocation.round_number
<< equivocation.first.id << equivocation.first
<< equivocation.second;
<< equivocation.first.id << equivocation.first.getBlockInfo()
<< equivocation.first.signature
<< equivocation.second.getBlockInfo()
<< equivocation.second.signature;
}
};

Expand Down
4 changes: 3 additions & 1 deletion core/consensus/grandpa/vote_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#pragma once

#include <cstdint>

namespace kagome::consensus::grandpa {
enum class VoteType { Prevote, Precommit };
enum class VoteType : uint8_t { Prevote, Precommit };
}

0 comments on commit 1981045

Please sign in to comment.