Skip to content

Commit

Permalink
feat(worker): pipeline block building (#735)
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfirmak committed May 21, 2024
1 parent caec0c3 commit c7990a3
Show file tree
Hide file tree
Showing 9 changed files with 1,366 additions and 326 deletions.
5 changes: 5 additions & 0 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -2286,3 +2286,8 @@ func (bc *BlockChain) InsertHeaderChain(chain []*types.Header, checkFreq int) (i
_, err := bc.hc.InsertHeaderChain(chain, start)
return 0, err
}

// Database gives access to the underlying database for convenience
func (bc *BlockChain) Database() ethdb.Database {
return bc.db
}
5 changes: 0 additions & 5 deletions eth/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,6 @@ func (api *PrivateMinerAPI) SetEtherbase(etherbase common.Address) bool {
return true
}

// SetRecommitInterval updates the interval for miner sealing work recommitting.
func (api *PrivateMinerAPI) SetRecommitInterval(interval int) {
api.e.Miner().SetRecommitInterval(time.Duration(interval) * time.Millisecond)
}

// PrivateAdminAPI is the collection of Ethereum full node-related APIs
// exposed over the private admin endpoint.
type PrivateAdminAPI struct {
Expand Down
5 changes: 0 additions & 5 deletions internal/web3ext/web3ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -637,11 +637,6 @@ web3._extend({
params: 1,
inputFormatter: [web3._extend.utils.fromDecimal]
}),
new web3._extend.Method({
name: 'setRecommitInterval',
call: 'miner_setRecommitInterval',
params: 1,
}),
new web3._extend.Method({
name: 'getHashrate',
call: 'miner_getHashrate'
Expand Down
5 changes: 0 additions & 5 deletions miner/miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,6 @@ func (miner *Miner) SetExtra(extra []byte) error {
return nil
}

// SetRecommitInterval sets the interval for sealing work resubmitting.
func (miner *Miner) SetRecommitInterval(interval time.Duration) {
miner.worker.setRecommitInterval(interval)
}

// Pending returns the currently pending block and associated state.
func (miner *Miner) Pending() (*types.Block, *state.StateDB) {
return miner.worker.pending()
Expand Down
Loading

0 comments on commit c7990a3

Please sign in to comment.