|
|
@ -183,6 +183,9 @@ func (node *Node) CalculateResponse(request *downloader_pb.DownloaderRequest) (* |
|
|
|
var hash common.Hash |
|
|
|
var hash common.Hash |
|
|
|
hash.SetBytes(bytes) |
|
|
|
hash.SetBytes(bytes) |
|
|
|
block := node.blockchain.GetBlockByHash(hash) |
|
|
|
block := node.blockchain.GetBlockByHash(hash) |
|
|
|
|
|
|
|
if block == nil { |
|
|
|
|
|
|
|
continue |
|
|
|
|
|
|
|
} |
|
|
|
encodedBlock, err := rlp.EncodeToBytes(block) |
|
|
|
encodedBlock, err := rlp.EncodeToBytes(block) |
|
|
|
if err == nil { |
|
|
|
if err == nil { |
|
|
|
response.Payload = append(response.Payload, encodedBlock) |
|
|
|
response.Payload = append(response.Payload, encodedBlock) |
|
|
|