mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd/geth retesteth: add ethash mining support for retesteth
This commit is contained in:
parent
05ccbb5edd
commit
dd41e71e9d
1 changed files with 7 additions and 0 deletions
|
|
@ -548,6 +548,13 @@ func (api *RetestethAPI) mineBlock() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
resultCh := make(chan *types.Block, 1)
|
||||
stopCh := make(chan struct{})
|
||||
err = api.engine.Seal(api.blockchain, block, resultCh, stopCh)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
block = <-resultCh
|
||||
return api.importBlock(block)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue