From dd47862829b486f5dd6650f49c97950dfdb68de7 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Tue, 23 Oct 2012 20:35:55 +0200 Subject: [PATCH] Minor reformatting --- core/src/main/java/com/google/bitcoin/core/Peer.java | 9 +++------ .../src/main/java/com/google/bitcoin/core/PeerGroup.java | 4 +--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/com/google/bitcoin/core/Peer.java b/core/src/main/java/com/google/bitcoin/core/Peer.java index d520a1c91..4eb29ab33 100644 --- a/core/src/main/java/com/google/bitcoin/core/Peer.java +++ b/core/src/main/java/com/google/bitcoin/core/Peer.java @@ -157,15 +157,13 @@ public class Peer { class PeerHandler extends SimpleChannelHandler { @Override - public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) - throws Exception { + public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { super.channelClosed(ctx, e); notifyDisconnect(); } @Override - public void connectRequested(ChannelHandlerContext ctx, ChannelStateEvent e) - throws Exception { + public void connectRequested(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { super.connectRequested(ctx, e); channel = e.getChannel(); address = new PeerAddress((InetSocketAddress)e.getValue()); @@ -173,8 +171,7 @@ public class Peer { /** Catch any exceptions, logging them and then closing the channel. */ @Override - public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) - throws Exception { + public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception { if (e.getCause() instanceof ConnectException || e.getCause() instanceof IOException) { // Short message for network errors log.info(toString() + " - " + e.getCause().getMessage()); diff --git a/core/src/main/java/com/google/bitcoin/core/PeerGroup.java b/core/src/main/java/com/google/bitcoin/core/PeerGroup.java index 1623d49fa..285080bc8 100644 --- a/core/src/main/java/com/google/bitcoin/core/PeerGroup.java +++ b/core/src/main/java/com/google/bitcoin/core/PeerGroup.java @@ -202,9 +202,7 @@ public class PeerGroup { Peer peer = new Peer(params, chain, ver); peer.addLifecycleListener(startupListener); pendingPeers.add(peer); - TCPNetworkConnection codec = - new TCPNetworkConnection(params, - peer.getVersionMessage()); + TCPNetworkConnection codec = new TCPNetworkConnection(params, peer.getVersionMessage()); p.addLast("codec", codec.getHandler()); p.addLast("peer", peer.getHandler()); return p;