From 6c5c5f0dbb7b70f305ac272705bb9807f6ff37e7 Mon Sep 17 00:00:00 2001 From: Gianluigi Date: Wed, 27 Aug 2014 12:39:26 +0200 Subject: [PATCH] using a linked hash map --- .../java/org/ethereum/net/message/PeersMessage.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ethereumj-core/src/main/java/org/ethereum/net/message/PeersMessage.java b/ethereumj-core/src/main/java/org/ethereum/net/message/PeersMessage.java index b1fb9b99..da31863b 100644 --- a/ethereumj-core/src/main/java/org/ethereum/net/message/PeersMessage.java +++ b/ethereumj-core/src/main/java/org/ethereum/net/message/PeersMessage.java @@ -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 peers = new HashSet(); + private final Set peers = new LinkedHashSet(); public PeersMessage(byte[] payload) { super(RLP.decode2(payload));