Unverified Commit 8d564428 authored by Paladz's avatar Paladz Committed by GitHub

Merge pull request #1741 from Bytom/fix_empty_pointer

fix the bug
parents 9fd65897 9d66bb41
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment