cmd/devp2p/internal/ethtest: return request ID in BlockHeaders response (#22508)

This PR fixes an issue with the eth66 test suite where, during a readAndServe when
the test is manually responding to GetBlockHeader requests, it now responds
with a BlockHeaders eth66 packet that includes the inbound request ID.
pull/22537/head
rene 4 years ago committed by GitHub
parent 117fa7d4a1
commit 6a528fce33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      cmd/devp2p/internal/ethtest/eth66_suiteHelpers.go

@ -141,8 +141,11 @@ func (c *Conn) readAndServe66(chain *Chain, timeout time.Duration) (uint64, Mess
if err != nil {
return 0, errorf("could not get headers for inbound header request: %v", err)
}
if err := c.Write(headers); err != nil {
resp := &eth.BlockHeadersPacket66{
RequestId: reqID,
BlockHeadersPacket: eth.BlockHeadersPacket(headers),
}
if err := c.write66(resp, BlockHeaders{}.Code()); err != nil {
return 0, errorf("could not write to connection: %v", err)
}
default:

Loading…
Cancel
Save