From d42ce0f2c1b52e26cce475e411d97165fb975577 Mon Sep 17 00:00:00 2001 From: Oleg Kovalov Date: Mon, 30 Jul 2018 11:30:09 +0200 Subject: all: simplify switches (#17267) * all: simplify switches * silly mistake --- les/handler.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'les/handler.go') diff --git a/les/handler.go b/les/handler.go index a1c16cb87..2fc4cde34 100644 --- a/les/handler.go +++ b/les/handler.go @@ -1158,8 +1158,7 @@ func (pm *ProtocolManager) getHelperTrie(id uint, idx uint64) (common.Hash, stri // getHelperTrieAuxData returns requested auxiliary data for the given HelperTrie request func (pm *ProtocolManager) getHelperTrieAuxData(req HelperTrieReq) []byte { - switch { - case req.Type == htCanonical && req.AuxReq == auxHeader && len(req.Key) == 8: + if req.Type == htCanonical && req.AuxReq == auxHeader && len(req.Key) == 8 { blockNum := binary.BigEndian.Uint64(req.Key) hash := rawdb.ReadCanonicalHash(pm.chainDb, blockNum) return rawdb.ReadHeaderRLP(pm.chainDb, hash, blockNum) -- cgit v1.2.3