You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
btcd (https://github.com/conformal/btcd) is a full node bitcoin implementation written in Go. btcd does two separate writes, one for the header and the other for the payload:
// Write header.
n, err := w.Write(hw.Bytes())
if err != nil {
totalBytes += n
return totalBytes, err
}
totalBytes += n
// Write payload.
n, err = w.Write(payload)
if err != nil {
totalBytes += n
return totalBytes, err
}
totalBytes += n
protocol.py fails with a short payload:
if (data_len - HEADER_LEN) < msg['length']:
self.required_len = HEADER_LEN + msg['length']
raise PayloadTooShortError("got {} of {} bytes".format(
data_len, HEADER_LEN + msg['length']))
btcd (https://github.com/conformal/btcd) is a full node bitcoin implementation written in Go. btcd does two separate writes, one for the header and the other for the payload:
protocol.py fails with a short payload:
if (data_len - HEADER_LEN) < msg['length']:
self.required_len = HEADER_LEN + msg['length']
raise PayloadTooShortError("got {} of {} bytes".format(
data_len, HEADER_LEN + msg['length']))
If I add more debugging:
I believe you need to keep reading until there is no more data instead of erroring there.
The text was updated successfully, but these errors were encountered: