From: Sergey Matveev Date: Sat, 3 Jul 2021 18:53:37 +0000 (+0300) Subject: Check existing .nock when call initiated X-Git-Tag: v7.1.0^2~1 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e1158505e1142cd38564e3f2b3c3d240dee1ea6a;p=nncp.git Check existing .nock when call initiated --- diff --git a/src/sp.go b/src/sp.go index 7e74823..a1f51eb 100644 --- a/src/sp.go +++ b/src/sp.go @@ -658,6 +658,17 @@ func (state *SPState) StartWorkers( } if !state.NoCK { spCheckerOnce.Do(func() { go SPChecker(state.Ctx) }) + go func() { + for job := range state.Ctx.JobsNoCK(state.Node.Id) { + if job.PktEnc.Nice <= state.Nice { + spCheckerTasks <- SPCheckerTask{ + nodeId: state.Node.Id, + hsh: job.HshValue, + done: state.payloads, + } + } + } + }() } // Remaining handshake payload sending