From 9714fd58f03678068ac85dbb82668452d99794c5 Mon Sep 17 00:00:00 2001 From: semux Date: Sat, 6 Jul 2019 20:03:10 +0100 Subject: [PATCH] Trivial: add error log --- src/main/java/org/semux/consensus/SemuxBft.java | 1 + src/main/java/org/semux/core/BlockchainImpl.java | 1 + src/main/java/org/semux/net/SemuxP2pHandler.java | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/semux/consensus/SemuxBft.java b/src/main/java/org/semux/consensus/SemuxBft.java index a8cdcd7c7..a337a0db7 100644 --- a/src/main/java/org/semux/consensus/SemuxBft.java +++ b/src/main/java/org/semux/consensus/SemuxBft.java @@ -876,6 +876,7 @@ protected boolean validateBlockProposal(BlockHeader header, List tr validBlocks.put(ByteArray.of(block.getHash()), block); return true; } catch (Exception e) { + logger.error("Unexpected exception during block proposal validation", e); return false; } } diff --git a/src/main/java/org/semux/core/BlockchainImpl.java b/src/main/java/org/semux/core/BlockchainImpl.java index c537e6fb3..cc8eae48f 100644 --- a/src/main/java/org/semux/core/BlockchainImpl.java +++ b/src/main/java/org/semux/core/BlockchainImpl.java @@ -728,6 +728,7 @@ protected boolean validateBlock(Block block, AccountState asSnapshot, DelegateSt return true; } catch (Exception e) { + logger.error("Unexpected exception during block validation", e); return false; } } diff --git a/src/main/java/org/semux/net/SemuxP2pHandler.java b/src/main/java/org/semux/net/SemuxP2pHandler.java index 5ffefc3dd..2fbefcc7d 100644 --- a/src/main/java/org/semux/net/SemuxP2pHandler.java +++ b/src/main/java/org/semux/net/SemuxP2pHandler.java @@ -159,7 +159,6 @@ public void channelActive(ChannelHandlerContext ctx) throws Exception { // doesn't enable new handshake protocol. } } else { - System.out.println("Sending v1 message"); if (channel.isOutbound()) { msgQueue.sendMessage(new org.semux.net.msg.p2p.handshake.v1.HelloMessage( config.network(), config.networkVersion(), client.getPeerId(),