OSDN Git Service
(root)
/
bytom
/
bytom.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61b3534
)
fix the bug
author
paladz
<453256728@qq.com>
Fri, 26 Apr 2019 02:05:05 +0000
(10:05 +0800)
committer
paladz
<453256728@qq.com>
Fri, 26 Apr 2019 02:05:05 +0000
(10:05 +0800)
mining/miningpool/miningpool.go
patch
|
blob
|
history
diff --git
a/mining/miningpool/miningpool.go
b/mining/miningpool/miningpool.go
index
1e6eb89
..
c6906c2
100644
(file)
--- a/
mining/miningpool/miningpool.go
+++ b/
mining/miningpool/miningpool.go
@@
-94,6
+94,10
@@
func (m *MiningPool) GetWork() (*types.BlockHeader, error) {
// SubmitWork will try to submit the result to the blockchain
func (m *MiningPool) SubmitWork(bh *types.BlockHeader) error {
+ if bh == nil {
+ return errors.New("can't submit empty block")
+ }
+
reply := make(chan error, 1)
m.submitCh <- &submitBlockMsg{blockHeader: bh, reply: reply}
err := <-reply