mirror of
https://github.com/cryptonote-social/csminer.git
synced 2024-09-11 05:35:23 +03:00
fix bug in sending chats when diff=5000
This commit is contained in:
parent
de9ed276fb
commit
a0a6279ffc
@ -56,7 +56,7 @@ func GetChatsToSend(diff int64) []client.ChatToSend {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
r := []client.ChatToSend{}
|
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{
|
r = append(r, client.ChatToSend{
|
||||||
ID: int64(chatToSendIndex) ^ randID,
|
ID: int64(chatToSendIndex) ^ randID,
|
||||||
Message: chatQueue[chatToSendIndex],
|
Message: chatQueue[chatToSendIndex],
|
||||||
|
@ -684,7 +684,7 @@ func goMine(job client.MultiClientJob, thread int) {
|
|||||||
time.Sleep(time.Second)
|
time.Sleep(time.Second)
|
||||||
}
|
}
|
||||||
chats := chat.GetChatsToSend(int64(diffTarget))
|
chats := chat.GetChatsToSend(int64(diffTarget))
|
||||||
//crylog.Info("sending chatmsg:", chatMsg)
|
//crylog.Info("sending chatmsgs:", chats)
|
||||||
resp, err := cl.SubmitWork(fnonce, jobid, chats)
|
resp, err := cl.SubmitWork(fnonce, jobid, chats)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
crylog.Warn("Submit work client failure:", jobid, err)
|
crylog.Warn("Submit work client failure:", jobid, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user