4 "github.com/bytom/mining"
5 "github.com/bytom/protocol/bc/legacy"
8 // Get the parameters of mining
9 func (bcr *BlockchainReactor) getWork() *WorkResp {
11 if block, err := mining.NewBlockTemplate(bcr.chain, bcr.txPool, bcr.accounts); err != nil {
14 resp.Header = block.BlockHeader
16 seedCaches := bcr.chain.SeedCaches()
17 if seedCache, err := seedCaches.Get(&resp.Header.Seed); err != nil {
20 resp.Cache = seedCache
26 type WorkResp struct {
27 Header legacy.BlockHeader