all: simplify switches (#17267)
* all: simplify switches * silly mistake
This commit is contained in:
committed by
Péter Szilágyi
parent
273c7a9dc4
commit
d42ce0f2c1
@ -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)
|
||||
|
Reference in New Issue
Block a user