From f3da67bd7720863cb12ac0edea0fb03939a2a2b5 Mon Sep 17 00:00:00 2001 From: Mostafa Date: Fri, 30 Aug 2024 12:08:18 +0800 Subject: [PATCH] style(store): change switch case order --- store/block.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/store/block.go b/store/block.go index 3cf45319b..2787a8bbe 100644 --- a/store/block.go +++ b/store/block.go @@ -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) @@ -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} }