sync-v2: "unexpected BLOCK" error
alexruzenhack opened this issue · 2 comments
alexruzenhack commented
Reported in this on-call-incident: https://github.com/HathorNetwork/on-call-incidents/issues/141
The sync-v2 emits this error when receive handle_blocks call but the peer is not in syncing state.
def handle_blocks(self, payload: str) -> None:
""" Handle a BLOCKS message.
"""
if self.state is not PeerState.SYNCING_BLOCKS:
self.log.error('unexpected BLOCK', state=self.state)
self.protocol.send_error_and_close_connection('Not expecting to receive BLOCK message')
return
Jan's quote:
This is a bug on sync-v2, it should close the connection instead of only entering an ERROR state, I think we already discussed about entirely removing the ERROR state.
luislhl commented
This is also happening to some other messages, like unexpected BLOCKS-END
, just for the record.
jansegre commented
This has been fixed.