aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2016-11-30 17:48:48 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-11-30 17:48:48 +0800
commit9f8bc00cf56bdf2cabf060303ed69f277a03357a (patch)
tree1d3e13d602c3ae2a0106fef23cc620aba4962f2c /eth
parent3363a1c2277ccd3aee9e05850accd8c50e016bfa (diff)
downloadgo-tangerine-9f8bc00cf56bdf2cabf060303ed69f277a03357a.tar
go-tangerine-9f8bc00cf56bdf2cabf060303ed69f277a03357a.tar.gz
go-tangerine-9f8bc00cf56bdf2cabf060303ed69f277a03357a.tar.bz2
go-tangerine-9f8bc00cf56bdf2cabf060303ed69f277a03357a.tar.lz
go-tangerine-9f8bc00cf56bdf2cabf060303ed69f277a03357a.tar.xz
go-tangerine-9f8bc00cf56bdf2cabf060303ed69f277a03357a.tar.zst
go-tangerine-9f8bc00cf56bdf2cabf060303ed69f277a03357a.zip
eth, miner: removed unnecessary state.Copy()
* miner: removed unnecessary state.Copy() * eth: made use of new miner method without state copying * miner: More documentation about new method
Diffstat (limited to 'eth')
-rw-r--r--eth/api_backend.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/api_backend.go b/eth/api_backend.go
index 0925132ef..7858dee2e 100644
--- a/eth/api_backend.go
+++ b/eth/api_backend.go
@@ -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