diff --git a/radixdlt-core/radixdlt/src/main/java/com/radixdlt/network/p2p/transport/ExceptionHandler.java b/radixdlt-core/radixdlt/src/main/java/com/radixdlt/network/p2p/transport/ExceptionHandler.java index be27ca11ee..fb0f5bfaa4 100644 --- a/radixdlt-core/radixdlt/src/main/java/com/radixdlt/network/p2p/transport/ExceptionHandler.java +++ b/radixdlt-core/radixdlt/src/main/java/com/radixdlt/network/p2p/transport/ExceptionHandler.java @@ -109,8 +109,12 @@ private void handleFailure(Future future, ChannelHandlerContext ctx) { } private void logAndCloseChannel(ChannelHandlerContext ctx, Throwable cause) { - var affectedEntity = mainHandler.map(Object::toString).orElse("channel"); - log.warn("Exception on {} {}, closing channel to prevent resource leak", affectedEntity, cause); + if (log.isTraceEnabled()) { + var affectedEntity = mainHandler.map(Object::toString).orElse("(to a peer via proxy)"); + log.trace("Closing channel {} due to {}", affectedEntity, cause); + } + + // The channel is closed to prevent a resource leak ctx.close(); } } diff --git a/radixdlt-core/radixdlt/src/main/java/com/radixdlt/statecomputer/RadixEngineStateComputer.java b/radixdlt-core/radixdlt/src/main/java/com/radixdlt/statecomputer/RadixEngineStateComputer.java index 9c968b975b..6afc35cb61 100644 --- a/radixdlt-core/radixdlt/src/main/java/com/radixdlt/statecomputer/RadixEngineStateComputer.java +++ b/radixdlt-core/radixdlt/src/main/java/com/radixdlt/statecomputer/RadixEngineStateComputer.java @@ -227,8 +227,11 @@ public void addToMempool(MempoolAdd mempoolAdd, @Nullable BFTNode origin) { txn -> { try { addToMempool(txn, origin); + } catch (MempoolDuplicateException ex) { + log.trace( + "Transaction {} was not added as it was already in the mempool", txn.getId()); } catch (MempoolRejectedException ex) { - log.debug("Txn rejected from the mempool", ex); + log.debug("Transaction {} was not added to the mempool", txn.getId(), ex); } }); }