diff --git a/les/client.go b/les/client.go index b367681f37..1ad44e16d7 100644 --- a/les/client.go +++ b/les/client.go @@ -176,7 +176,9 @@ func (s *LightDummyAPI) Mining() bool { // APIs returns the collection of RPC services the ethereum package offers. // NOTE, some of these services probably need to be moved to somewhere else. func (s *LightEthereum) APIs() []rpc.API { - return append(ethapi.GetAPIs(s.ApiBackend), []rpc.API{ + apis := ethapi.GetAPIs(s.ApiBackend) + apis = append(apis, s.engine.APIs(s.BlockChain().HeaderChain())...) + return append(apis, []rpc.API{ { Namespace: "eth", Version: "1.0", diff --git a/light/lightchain.go b/light/lightchain.go index 02b90138a2..90ea263237 100644 --- a/light/lightchain.go +++ b/light/lightchain.go @@ -143,6 +143,11 @@ func (lc *LightChain) Odr() OdrBackend { return lc.odr } +// HeaderChain returns the underlying header chain. +func (lc *LightChain) HeaderChain() *core.HeaderChain { + return lc.hc +} + // loadLastState loads the last known chain state from the database. This method // assumes that the chain manager mutex is held. func (lc *LightChain) loadLastState() error {