Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
power-node
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
power-node
Commits
fa90d6b2
Commit
fa90d6b2
authored
Mar 04, 2024
by
duanjinfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update send msg time
parent
8ca243e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
start.go
nm/start.go
+12
-11
No files found.
nm/start.go
View file @
fa90d6b2
...
...
@@ -164,6 +164,7 @@ func monitorWorker(op *operate.DockerOp) {
}
ticker
=
time
.
NewTicker
(
time
.
Second
*
20
)
msgRespWorker
.
RegisterMsgResp
(
nodeManager
,
worker
,
RegisterInfoResp
,
nil
)
time
.
Sleep
(
time
.
Second
*
2
)
msgRespWorker
.
RegisterMsgResp
(
nodeManager
,
worker
,
DeviceInfoResp
,
nil
)
isSend
=
true
log
.
Info
(
"------------------------Send once-off message ended------------------------"
)
...
...
@@ -176,12 +177,12 @@ func monitorWorker(op *operate.DockerOp) {
log
.
Info
(
"Report model info started"
)
// 证明存储
go
proofWorker
.
ProofStorage
()
log
.
Info
(
"Proof storage worker started"
)
//
go proofWorker.ProofStorage()
//
log.Info("Proof storage worker started")
// 证明提交
go
proofWorker
.
CommitWitness
()
log
.
Info
(
"Proof commit worker started"
)
//
go proofWorker.CommitWitness()
//
log.Info("Proof commit worker started")
go
handlerStandardTask
(
nodeManager
,
worker
,
msgRespWorker
,
taskMsgWorker
)
log
.
Info
(
"Handler standard task worker started"
)
...
...
@@ -307,25 +308,25 @@ func handlerMsg(nodeManager *models.NodeManagerClient,
nmResultMsg
:=
rev
.
GetProofTaskResult
()
if
nmResultMsg
!=
nil
{
containerSign
,
_
:=
taskMsgWorker
.
LruCache
.
Get
(
nmResultMsg
.
TaskId
+
models
.
ContainerSign
)
//
containerSign, _ := taskMsgWorker.LruCache.Get(nmResultMsg.TaskId + models.ContainerSign)
//if !ok {
// log.Error("taskMsgWorker.LruCache.Get failed: ", nmSignMsg.TaskUuid+models.ContainerSign)
//}
minerSign
,
_
:=
taskMsgWorker
.
LruCache
.
Get
(
nmResultMsg
.
TaskId
+
models
.
MinerSign
)
//
minerSign, _ := taskMsgWorker.LruCache.Get(nmResultMsg.TaskId + models.MinerSign)
//if !ok {
// log.Error("taskMsgWorker.LruCache.Get failed: ", nmSignMsg.TaskUuid+models.MinerSign)
//}
reqHash
,
_
:=
taskMsgWorker
.
LruCache
.
Get
(
nmResultMsg
.
TaskId
+
models
.
ReqHash
)
//
reqHash, _ := taskMsgWorker.LruCache.Get(nmResultMsg.TaskId + models.ReqHash)
//if !ok {
// log.Error("taskMsgWorker.LruCache.Get failed: ", nmSignMsg.TaskUuid+models.ReqHash)
//}
respHash
,
_
:=
taskMsgWorker
.
LruCache
.
Get
(
nmResultMsg
.
TaskId
+
models
.
RespHash
)
//
respHash, _ := taskMsgWorker.LruCache.Get(nmResultMsg.TaskId + models.RespHash)
//if !ok {
// log.Error("taskMsgWorker.LruCache.Get failed: ", nmSignMsg.TaskUuid+models.RespHash)
//}
taskType
,
_
:=
taskMsgWorker
.
LruCache
.
Get
(
nmResultMsg
.
TaskId
+
models
.
TaskType
)
proofWorker
.
ProductProof
(
nmResultMsg
,
taskType
.
(
uint64
),
reqHash
.
([]
byte
),
respHash
.
([]
byte
),
containerSign
.
([]
byte
),
minerSign
.
([]
byte
))
log
.
Info
(
nmResultMsg
)
//
taskType, _ := taskMsgWorker.LruCache.Get(nmResultMsg.TaskId + models.TaskType)
//
proofWorker.ProductProof(nmResultMsg, taskType.(uint64), reqHash.([]byte), respHash.([]byte), containerSign.([]byte), minerSign.([]byte))
log
.
WithField
(
"proof"
,
nmResultMsg
)
.
Info
(
"Output proof task result"
)
continue
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment