IbftProcessor logs when a throwable terminates mining (#1427)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Trent Mohay 6 years ago committed by GitHub
parent d87b6c4416
commit c13e8d5a92
  1. 8
      consensus/ibft/src/main/java/tech/pegasys/pantheon/consensus/ibft/IbftProcessor.java

@ -48,8 +48,12 @@ public class IbftProcessor implements Runnable {
@Override
public void run() {
while (!shutdown) {
nextIbftEvent().ifPresent(event -> eventMultiplexer.handleIbftEvent(event));
try {
while (!shutdown) {
nextIbftEvent().ifPresent(eventMultiplexer::handleIbftEvent);
}
} catch (final Throwable t) {
LOG.error("IBFT Mining thread has suffered a fatal error, mining has been halted", t);
}
// Clean up the executor service the round timer has been utilising
LOG.info("Shutting down IBFT event processor");

Loading…
Cancel
Save