fix bug in sending chats when diff=5000

This commit is contained in:
cryptonote-social 2021-01-04 09:29:34 -08:00
parent de9ed276fb
commit a0a6279ffc
2 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ func GetChatsToSend(diff int64) []client.ChatToSend {
return nil
}
r := []client.ChatToSend{}
for diff > HASHES_PER_CHAT && chatToSendIndex < len(chatQueue) && len(r) < MAX_CHATS_PER_SHARE {
for diff >= HASHES_PER_CHAT && chatToSendIndex < len(chatQueue) && len(r) < MAX_CHATS_PER_SHARE {
r = append(r, client.ChatToSend{
ID: int64(chatToSendIndex) ^ randID,
Message: chatQueue[chatToSendIndex],

View File

@ -684,7 +684,7 @@ func goMine(job client.MultiClientJob, thread int) {
time.Sleep(time.Second)
}
chats := chat.GetChatsToSend(int64(diffTarget))
//crylog.Info("sending chatmsg:", chatMsg)
//crylog.Info("sending chatmsgs:", chats)
resp, err := cl.SubmitWork(fnonce, jobid, chats)
if err != nil {
crylog.Warn("Submit work client failure:", jobid, err)