Fix stuck block detection

Only update time of when a block is received only when a block is received (rather than when any message is received).
You're turning a lone code block into an if, so you'll have to adapt the indentation to fit an if block...