diff options
author | Oleg Kovalov <iamolegkovalov@gmail.com> | 2018-07-30 17:30:09 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-07-30 17:30:09 +0800 |
commit | d42ce0f2c1b52e26cce475e411d97165fb975577 (patch) | |
tree | 03043c37becf49145b23f4824f563e3443335698 /les | |
parent | 273c7a9dc4e8961e96e51bd8274436ff983a21ef (diff) | |
download | go-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.go | 3 |
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) |