aboutsummaryrefslogtreecommitdiffstats
path: root/les
diff options
context:
space:
mode:
authorOleg Kovalov <iamolegkovalov@gmail.com>2018-07-30 17:30:09 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-07-30 17:30:09 +0800
commitd42ce0f2c1b52e26cce475e411d97165fb975577 (patch)
tree03043c37becf49145b23f4824f563e3443335698 /les
parent273c7a9dc4e8961e96e51bd8274436ff983a21ef (diff)
downloadgo-tangerine-d42ce0f2c1b52e26cce475e411d97165fb975577.tar
go-tangerine-d42ce0f2c1b52e26cce475e411d97165fb975577.tar.gz
go-tangerine-d42ce0f2c1b52e26cce475e411d97165fb975577.tar.bz2
go-tangerine-d42ce0f2c1b52e26cce475e411d97165fb975577.tar.lz
go-tangerine-d42ce0f2c1b52e26cce475e411d97165fb975577.tar.xz
go-tangerine-d42ce0f2c1b52e26cce475e411d97165fb975577.tar.zst
go-tangerine-d42ce0f2c1b52e26cce475e411d97165fb975577.zip
all: simplify switches (#17267)
* all: simplify switches * silly mistake
Diffstat (limited to 'les')
-rw-r--r--les/handler.go3
1 files changed, 1 insertions, 2 deletions
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)