mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
eth: made use of new miner method without state copying
This commit is contained in:
parent
ad6f304d80
commit
785fc94e7f
1 changed files with 2 additions and 2 deletions
|
|
@ -56,7 +56,7 @@ func (b *EthApiBackend) SetHead(number uint64) {
|
|||
func (b *EthApiBackend) HeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Header, error) {
|
||||
// Pending block is only known by the miner
|
||||
if blockNr == rpc.PendingBlockNumber {
|
||||
block, _ := b.eth.miner.Pending()
|
||||
block := b.eth.miner.PendingBlock()
|
||||
return block.Header(), nil
|
||||
}
|
||||
// Otherwise resolve and return the block
|
||||
|
|
@ -69,7 +69,7 @@ func (b *EthApiBackend) HeaderByNumber(ctx context.Context, blockNr rpc.BlockNum
|
|||
func (b *EthApiBackend) BlockByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Block, error) {
|
||||
// Pending block is only known by the miner
|
||||
if blockNr == rpc.PendingBlockNumber {
|
||||
block, _ := b.eth.miner.Pending()
|
||||
block := b.eth.miner.PendingBlock()
|
||||
return block, nil
|
||||
}
|
||||
// Otherwise resolve and return the block
|
||||
|
|
|
|||
Loading…
Reference in a new issue