|
|
@ -75,7 +75,7 @@ type newPayloadResult struct { |
|
|
|
receipts []*types.Receipt // Receipts collected during construction
|
|
|
|
receipts []*types.Receipt // Receipts collected during construction
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// generateParams wraps various of settings for generating sealing task.
|
|
|
|
// generateParams wraps various settings for generating sealing task.
|
|
|
|
type generateParams struct { |
|
|
|
type generateParams struct { |
|
|
|
timestamp uint64 // The timestamp for sealing task
|
|
|
|
timestamp uint64 // The timestamp for sealing task
|
|
|
|
forceTime bool // Flag whether the given timestamp is immutable or not
|
|
|
|
forceTime bool // Flag whether the given timestamp is immutable or not
|
|
|
@ -131,7 +131,7 @@ func (miner *Miner) prepareWork(genParams *generateParams) (*environment, error) |
|
|
|
if genParams.parentHash != (common.Hash{}) { |
|
|
|
if genParams.parentHash != (common.Hash{}) { |
|
|
|
block := miner.chain.GetBlockByHash(genParams.parentHash) |
|
|
|
block := miner.chain.GetBlockByHash(genParams.parentHash) |
|
|
|
if block == nil { |
|
|
|
if block == nil { |
|
|
|
return nil, fmt.Errorf("missing parent") |
|
|
|
return nil, errors.New("missing parent") |
|
|
|
} |
|
|
|
} |
|
|
|
parent = block.Header() |
|
|
|
parent = block.Header() |
|
|
|
} |
|
|
|
} |
|
|
|