Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
timwu20 committed Oct 11, 2024
1 parent 972b91a commit 6add33b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/client/consensus/grandpa/aux_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func UpdateAuthoritySet[H comparable, N constraints.Unsigned, ID primitives.Auth
// We always keep around the justification for the best finalized block and overwrite it
// as we finalize new blocks, this makes sure that we don't store useless justifications
// but can always prove finality of the latest block.
func updateBestJustification[
func updateBestJustification[ //nolint:unused
Hash runtime.Hash,
N runtime.Number,
](
Expand Down
6 changes: 2 additions & 4 deletions internal/client/consensus/grandpa/change_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,12 +459,10 @@ func (ct *ChangeTree[H, N]) swapRemove(roots []*PendingChangeNode[H, N], index N
panic("swap_remove index out of bounds")
}

val := PendingChangeNode[H, N]{}
if roots[index] != nil {
val = *roots[index]
} else {
if roots[index] == nil {
panic("nil pending HashNumber node")
}
val := *roots[index]

lastElem := roots[len(roots)-1]

Expand Down

0 comments on commit 6add33b

Please sign in to comment.