From 033228cb041159af8b057c503cb23fed665ba797 Mon Sep 17 00:00:00 2001 From: cryptonote-social Date: Wed, 30 Dec 2020 08:48:26 -0800 Subject: [PATCH] log tweaks --- miner.go | 4 ++-- stratum/client/client.go | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/miner.go b/miner.go index 26ea6ee..661bd3e 100644 --- a/miner.go +++ b/miner.go @@ -155,7 +155,7 @@ func Mine(c *MinerConfig) error { u = client.UNAUTHENTICATED_USER_STRING + " (sent by you)" crylog.Warn("Sending chat without authentication. Provide -wallet string with your user login to authenticate.") } - crylog.Info("\n\nCHAT MESSAGE QUEUED TO SEND:\n[", u, "] (", time.Now().Truncate(time.Second), ")\n", chatMsg, "\n") + crylog.Info("\n\n[", u, "] (", time.Now().Truncate(time.Second), ")\n", chatMsg, "\n") } } @@ -243,7 +243,7 @@ func printStatsPeriodically() { for c := chat.NextChatReceived(); c != nil; c = chat.NextChatReceived() { _, ok := chatsSent[c.ID] if !ok { - crylog.Info("\n\nCHAT MESSAGE RECEIVED:\n[", c.Username, "] (", time.Unix(c.Timestamp, 0), ")\n", c.Message, "\n") + crylog.Info("\n\n[", c.Username, "] (", time.Unix(c.Timestamp, 0), ")\n", c.Message, "\n") } else { crylog.Info("queued chat successfully sent") } diff --git a/stratum/client/client.go b/stratum/client/client.go index fcfca3c..f2d0e9a 100644 --- a/stratum/client/client.go +++ b/stratum/client/client.go @@ -23,7 +23,8 @@ const ( CONNECT_JSON_ID = 666 GET_CHATS_JSON_ID = 9999 - MAX_REQUEST_SIZE = 50000 // Max # of bytes we will read per request + MAX_REQUEST_SIZE = 50000 // Max # of bytes we will read per request + MAX_RUNES_PER_CHAT = 1000 // any chats with more than this number of unicode chars will be ignored by server NO_WALLET_SPECIFIED_WARNING_CODE = 2