Merge pull request #101 from davassi/thread-safety
LinkedHashSet in favour of a simple HashSet
This commit is contained in:
commit
c5ea6b55e7
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue