OSDN Git Service
(root)
/
bytom
/
vapor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update dashboard (#321)
[bytom/vapor.git]
/
api
/
miner.go
diff --git
a/api/miner.go
b/api/miner.go
index
fcea43f
..
a7029e9
100644
(file)
--- a/
api/miner.go
+++ b/
api/miner.go
@@
-54,7
+54,7
@@
func (a *API) submitBlock(ctx context.Context, req *SubmitBlockReq) Response {
return NewErrorResponse(errors.New("block submitted is orphan"))
}
return NewErrorResponse(errors.New("block submitted is orphan"))
}
- if err = a.eventDispatcher.Post(event.New
Min
edBlockEvent{Block: *req.Block}); err != nil {
+ if err = a.eventDispatcher.Post(event.New
Propos
edBlockEvent{Block: *req.Block}); err != nil {
return NewErrorResponse(err)
}
return NewErrorResponse(err)
}
@@
-74,7
+74,7
@@
func (a *API) setMining(in struct {
}
func (a *API) startMining() Response {
}
func (a *API) startMining() Response {
- a.
cpuMin
er.Start()
+ a.
blockPropos
er.Start()
if !a.IsMining() {
return NewErrorResponse(errors.New("Failed to start mining"))
}
if !a.IsMining() {
return NewErrorResponse(errors.New("Failed to start mining"))
}
@@
-82,7
+82,7
@@
func (a *API) startMining() Response {
}
func (a *API) stopMining() Response {
}
func (a *API) stopMining() Response {
- a.
cpuMin
er.Stop()
+ a.
blockPropos
er.Stop()
if a.IsMining() {
return NewErrorResponse(errors.New("Failed to stop mining"))
}
if a.IsMining() {
return NewErrorResponse(errors.New("Failed to stop mining"))
}