Merge pull request #101 from davassi/thread-safety

LinkedHashSet in favour of a simple HashSet
This commit is contained in:
romanman 2014-08-27 14:04:12 +03:00
commit c5ea6b55e7
1 changed files with 5 additions and 7 deletions

View File

@ -1,13 +1,11 @@
package org.ethereum.net.message;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import static org.ethereum.net.Command.PEERS;
import java.nio.ByteBuffer;
import java.util.LinkedHashSet;
import java.util.Set;
import org.ethereum.net.Command;
import org.ethereum.net.client.PeerData;
import org.ethereum.util.RLP;
@ -23,7 +21,7 @@ public class PeersMessage extends Message {
private boolean parsed = false;
private final Set<PeerData> peers = new HashSet<PeerData>();
private final Set<PeerData> peers = new LinkedHashSet<PeerData>();
public PeersMessage(byte[] payload) {
super(RLP.decode2(payload));