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