From 6ed969addca510a0be735863fa62bfea8bd10325 Mon Sep 17 00:00:00 2001 From: woodser Date: Wed, 26 Apr 2023 10:11:38 -0400 Subject: [PATCH] do not log batch processing 0 mailbox entries --- .../haveno/network/p2p/mailbox/MailboxMessageService.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/p2p/src/main/java/haveno/network/p2p/mailbox/MailboxMessageService.java b/p2p/src/main/java/haveno/network/p2p/mailbox/MailboxMessageService.java index 6dcd326b..5249a7ca 100644 --- a/p2p/src/main/java/haveno/network/p2p/mailbox/MailboxMessageService.java +++ b/p2p/src/main/java/haveno/network/p2p/mailbox/MailboxMessageService.java @@ -414,9 +414,11 @@ public class MailboxMessageService implements HashMapChangedListener, PersistedD new Thread(() -> { try { var mailboxItems = getMailboxItems(protectedMailboxStorageEntries); - log.info("Batch processing of {} mailbox entries took {} ms", - protectedMailboxStorageEntries.size(), - System.currentTimeMillis() - ts); + + if (!protectedMailboxStorageEntries.isEmpty()) + log.info("Batch processing of {} mailbox entries took {} ms", + protectedMailboxStorageEntries.size(), + System.currentTimeMillis() - ts); future.set(mailboxItems); } catch (Throwable throwable) {