arrange node-template service (#11795)

* make template more clear

* fmt check_equivocation

Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
yjh
2022-07-18 06:43:04 +08:00
committed by GitHub
parent 4c0b765980
commit 749c501b77
2 changed files with 20 additions and 20 deletions
@@ -89,8 +89,8 @@ where
// 1) signed by the same voter,
if prev_signer == signer {
// 2) with different hash
if header.hash() != prev_header.hash() {
return Ok(Some(EquivocationProof {
return if header.hash() != prev_header.hash() {
Ok(Some(EquivocationProof {
slot,
offender: signer.clone(),
first_header: prev_header.clone(),
@@ -100,7 +100,7 @@ where
// We don't need to continue in case of duplicated header,
// since it's already saved and a possible equivocation
// would have been detected before.
return Ok(None)
Ok(None)
}
}
}