|
|
|
@ -316,7 +316,6 @@ func handleBlockBodies(backend Backend, msg Decoder, peer *Peer) error { |
|
|
|
|
txsHashes = make([]common.Hash, len(res.BlockBodiesResponse)) |
|
|
|
|
uncleHashes = make([]common.Hash, len(res.BlockBodiesResponse)) |
|
|
|
|
withdrawalHashes = make([]common.Hash, len(res.BlockBodiesResponse)) |
|
|
|
|
requestsHashes = make([]common.Hash, len(res.BlockBodiesResponse)) |
|
|
|
|
) |
|
|
|
|
hasher := trie.NewStackTrie(nil) |
|
|
|
|
for i, body := range res.BlockBodiesResponse { |
|
|
|
@ -325,11 +324,8 @@ func handleBlockBodies(backend Backend, msg Decoder, peer *Peer) error { |
|
|
|
|
if body.Withdrawals != nil { |
|
|
|
|
withdrawalHashes[i] = types.DeriveSha(types.Withdrawals(body.Withdrawals), hasher) |
|
|
|
|
} |
|
|
|
|
if body.Requests != nil { |
|
|
|
|
requestsHashes[i] = types.CalcRequestsHash(body.Requests) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return [][]common.Hash{txsHashes, uncleHashes, withdrawalHashes, requestsHashes} |
|
|
|
|
return [][]common.Hash{txsHashes, uncleHashes, withdrawalHashes} |
|
|
|
|
} |
|
|
|
|
return peer.dispatchResponse(&Response{ |
|
|
|
|
id: res.RequestId, |
|
|
|
|