adding fix

This commit is contained in:
romanman 2014-10-13 09:32:16 -05:00 committed by nicksavers
parent 54aaa14d05
commit e386520856
3 changed files with 3 additions and 3 deletions

View File

@ -220,7 +220,7 @@ public class EthHandler extends SimpleChannelInboundHandler<EthMessage> {
}
private void sendStatus() {
byte protocolVersion = 33, networkId = 0;
byte protocolVersion = CONFIG.protocolVersion(), networkId = 0;
BigInteger totalDifficulty = this.blockchain.getTotalDifficulty();
byte[] bestHash = this.blockchain.getLatestBlockHash();
StatusMessage msg = new StatusMessage(protocolVersion, networkId,

View File

@ -129,7 +129,7 @@ public class P2pHandler extends SimpleChannelInboundHandler<P2pMessage> {
}
private void processPeers(ChannelHandlerContext ctx, PeersMessage peersMessage) {
// WorldManager.getInstance().getPeerDiscovery().addPeers(peersMessage.getPeers());
WorldManager.getInstance().getPeerDiscovery().addPeers(peersMessage.getPeers());
}
private void sendPeers() {

View File

@ -80,7 +80,7 @@ public class HelloMessage extends P2pMessage {
byte[] clientId = RLP.encodeString(this.clientId);
byte[][] capabilities = new byte[this.capabilities.size()][];
for (int i = 0; i < this.capabilities.size(); i++) {
capabilities[i] = RLP.encode(this.capabilities.get(i).getBytes());
capabilities[i] = RLP.encodeElement(this.capabilities.get(i).getBytes());
}
byte[] capabilityList = RLP.encodeList(capabilities);
byte[] peerPort = RLP.encodeInt(this.listenPort);