Skip to content
This repository was archived by the owner on Aug 23, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/main/java/com/iota/iri/network/TCPNeighbor.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
/**
* Created by paul on 4/15/17.
*/

/**
* This class Extends {@link Neighbor} base class with TCP specific functionality.
* This class Extends {@link Neighbor} base class with TCP specific functionality.
* It keeps reference of Source and Sink while maintaining a sendQueue for keeping
* outgoing requests.
*
* outgoing requests.
*
*/
public class TCPNeighbor extends Neighbor {
private static final Logger log = LoggerFactory.getLogger(Neighbor.class);
Expand Down Expand Up @@ -93,7 +93,7 @@ public void send(DatagramPacket packet) {
synchronized (sendQueue) {
if (sendQueue.remainingCapacity() == 0) {
sendQueue.poll();
log.info("Sendqueue full...dropped 1 tx");
log.debug("Sendqueue full...dropped 1 tx");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this info statement very useful while trying to peer nodes and noticing right away that there is a problem.
I agree it is very annoying the way it can flood the console.

Maybe use the IntervalLogger?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have the connection message for this case. In case a node drops the connection or doesnt accept packets (like with NELSON) you will not see anything in your cli.

}
byte[] bytes = packet.getData().clone();
sendQueue.add(ByteBuffer.wrap(bytes));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ public class SnapshotServiceImpl implements SnapshotService {
*/
private static final int OUTER_SHELL_SIZE = 100;

/**
* If transactions got orphaned we wait this additional time (in seconds) until we consider them orphaned.
*/
private static final int ORPHANED_TRANSACTION_GRACE_TIME = 3600;

/**
* Maximum age in milestones since creation of solid entry points.
*
Expand Down Expand Up @@ -522,7 +517,7 @@ private void persistLocalSnapshot(SnapshotProvider snapshotProvider, Snapshot ne
private boolean isOrphaned(Tangle tangle, TransactionViewModel transaction,
TransactionViewModel referenceTransaction, Set<Hash> processedTransactions) throws SnapshotException {

long arrivalTime = transaction.getArrivalTime() / 1000L + ORPHANED_TRANSACTION_GRACE_TIME;
long arrivalTime = transaction.getArrivalTime() / 1000L;
if (arrivalTime > referenceTransaction.getTimestamp()) {
return false;
}
Expand Down