Reduce number of seen blocks and transactions Pantheon tracks to lower required memory. (#1112)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Adrian Sutton 6 years ago committed by GitHub
parent f0c132e8aa
commit 8ef56242dd
  1. 2
      ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/EthPeer.java
  2. 2
      ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/transactions/PeerTransactionTracker.java

@ -48,7 +48,7 @@ public class EthPeer {
private static final Logger LOG = LogManager.getLogger();
private final PeerConnection connection;
private final int maxTrackedSeenBlocks = 30_000;
private final int maxTrackedSeenBlocks = 300;
private final Set<Hash> knownBlocks;
private final String protocolName;

@ -27,7 +27,7 @@ import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
class PeerTransactionTracker implements DisconnectCallback {
private static final int MAX_TRACKED_SEEN_TRANSACTIONS = 30_000;
private static final int MAX_TRACKED_SEEN_TRANSACTIONS = 10_000;
private final Map<EthPeer, Set<Hash>> seenTransactions = new ConcurrentHashMap<>();
private final Map<EthPeer, Set<Transaction>> transactionsToSend = new ConcurrentHashMap<>();

Loading…
Cancel
Save