cmd/geth retesteth: add ethash mining support for retesteth

This commit is contained in:
Martin Holst Swende 2020-02-18 19:31:45 +01:00
parent 05ccbb5edd
commit dd41e71e9d
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -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)
}