mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-09 22:06:21 +00:00
Add more diagnostic for crashes during SSZ serialization
This commit is contained in:
parent
2bbe2cb23c
commit
b5fad0c9e8
@ -608,6 +608,14 @@ proc p2pProtocolBackendImpl*(p: P2PProtocol): Backend =
|
|||||||
`await` sendErrorResponse(`peerVar`, `streamVar`, `errVar`,
|
`await` sendErrorResponse(`peerVar`, `streamVar`, `errVar`,
|
||||||
`msgNameLit`, `msgBytesVar`)
|
`msgNameLit`, `msgBytesVar`)
|
||||||
return
|
return
|
||||||
|
except Exception as err:
|
||||||
|
# TODO. This is temporary code that should be removed after interop.
|
||||||
|
# It can be enabled only in certain diagnostic builds where it should
|
||||||
|
# re-raise the exception.
|
||||||
|
debug "Crash during serialization", inputBytes = toHex(`msgBytesVar`),
|
||||||
|
msgName = `msgNameLit`,
|
||||||
|
deserializedType = astToStr(`msgRecName`)
|
||||||
|
`await` sendErrorResponse(`peerVar`, `streamVar`, ServerError, err.msg)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
`tracing`
|
`tracing`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user