minor fixes

This commit is contained in:
romanman 2014-10-28 23:25:45 -05:00
parent 561c4f2f86
commit 5f413d0ffb
4 changed files with 64 additions and 61 deletions

View File

@ -142,8 +142,11 @@ public class EthereumImpl implements Ethereum {
public PeerClient getDefaultPeer(){ public PeerClient getDefaultPeer(){
PeerClient peer = WorldManager.getInstance().getActivePeer(); PeerClient peer = WorldManager.getInstance().getActivePeer();
if (peer == null) if (peer == null){
peer = new PeerClient(); peer = new PeerClient();
WorldManager.getInstance().setActivePeer(peer);
}
return peer; return peer;
} }

View File

@ -15,7 +15,6 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
/** /**
* www.ethergit.com
* *
* @author: Roman Mandeleil * @author: Roman Mandeleil
* Created on: 15/10/2014 12:34 * Created on: 15/10/2014 12:34

View File

@ -76,12 +76,13 @@ public class ConnectionConsoleWindow extends JFrame implements PeerListener {
Thread t = new Thread() { Thread t = new Thread() {
public void run() { public void run() {
PeerClient clientPeer = UIEthereumManager.ethereum.getDefaultPeer();
clientPeer.setPeerListener(thisConsole); UIEthereumManager.ethereum.connect(SystemProperties.CONFIG.activePeerIP(),
clientPeer.connect(SystemProperties.CONFIG.activePeerIP(),
SystemProperties.CONFIG.activePeerPort()); SystemProperties.CONFIG.activePeerPort());
} }
}; };
UIEthereumManager.ethereum.getDefaultPeer().setPeerListener(this);
t.start(); t.start();
} }