gocritic (2/2) (#3864)

Refs #3262
This commit is contained in:
Marko
2019-08-02 08:53:52 +02:00
committed by Anton Kaliaev
parent 14fa800773
commit f9cce282da
26 changed files with 120 additions and 90 deletions

View File

@@ -162,11 +162,12 @@ func (spn *SimpleProofNode) FlattenAunts() [][]byte {
// Nonrecursive impl.
innerHashes := [][]byte{}
for spn != nil {
if spn.Left != nil {
switch {
case spn.Left != nil:
innerHashes = append(innerHashes, spn.Left.Hash)
} else if spn.Right != nil {
case spn.Right != nil:
innerHashes = append(innerHashes, spn.Right.Hash)
} else {
default:
break
}
spn = spn.Parent