aboutsummaryrefslogtreecommitdiffstats
path: root/les/api_backend.go
diff options
context:
space:
mode:
Diffstat (limited to 'les/api_backend.go')
-rw-r--r--les/api_backend.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/les/api_backend.go b/les/api_backend.go
index 264b381f5..7d69046de 100644
--- a/les/api_backend.go
+++ b/les/api_backend.go
@@ -17,6 +17,7 @@
package les
import (
+ "context"
"math/big"
"github.com/ethereum/go-ethereum/accounts"
@@ -33,12 +34,11 @@ import (
"github.com/ethereum/go-ethereum/light"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rpc"
- "golang.org/x/net/context"
)
type LesApiBackend struct {
eth *LightEthereum
- gpo *gasprice.LightPriceOracle
+ gpo *gasprice.Oracle
}
func (b *LesApiBackend) ChainConfig() *params.ChainConfig {
@@ -50,6 +50,7 @@ func (b *LesApiBackend) CurrentBlock() *types.Block {
}
func (b *LesApiBackend) SetHead(number uint64) {
+ b.eth.protocolManager.downloader.Cancel()
b.eth.blockchain.SetHead(number)
}
@@ -99,7 +100,7 @@ func (b *LesApiBackend) GetEVM(ctx context.Context, msg core.Message, state etha
from.SetBalance(math.MaxBig256)
vmstate := light.NewVMState(ctx, stateDb)
- context := core.NewEVMContext(msg, header, b.eth.blockchain)
+ context := core.NewEVMContext(msg, header, b.eth.blockchain, nil)
return vm.NewEVM(context, vmstate, b.eth.chainConfig, vmCfg), vmstate.Error, nil
}