Skip to content

Commit

Permalink
style(store): change switch case order
Browse files Browse the repository at this point in the history
  • Loading branch information
b00f committed Aug 30, 2024
1 parent f25dec6 commit f3da67b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions store/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,6 @@ func (bs *blockStore) publicKey(addr crypto.Address) (crypto.PublicKey, error) {
}
var pubKey crypto.PublicKey
switch addr.Type() {
case crypto.AddressTypeTreasury:
panic("unreachable")

case crypto.AddressTypeValidator,
crypto.AddressTypeBLSAccount:
pubKey, err = bls.PublicKeyFromBytes(data)
Expand All @@ -168,6 +165,9 @@ func (bs *blockStore) publicKey(addr crypto.Address) (crypto.PublicKey, error) {
return nil, err
}

case crypto.AddressTypeTreasury:
panic("unreachable")

default:
return nil, PublicKeyNotFoundError{Address: addr}
}
Expand Down

0 comments on commit f3da67b

Please sign in to comment.