mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
les: provide consensus engine RPC APIs
This commit is contained in:
parent
c5c5e0dbe8
commit
d7bd8b4cf1
2 changed files with 8 additions and 1 deletions
|
|
@ -176,7 +176,9 @@ func (s *LightDummyAPI) Mining() bool {
|
||||||
// APIs returns the collection of RPC services the ethereum package offers.
|
// APIs returns the collection of RPC services the ethereum package offers.
|
||||||
// NOTE, some of these services probably need to be moved to somewhere else.
|
// NOTE, some of these services probably need to be moved to somewhere else.
|
||||||
func (s *LightEthereum) APIs() []rpc.API {
|
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",
|
Namespace: "eth",
|
||||||
Version: "1.0",
|
Version: "1.0",
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,11 @@ func (lc *LightChain) Odr() OdrBackend {
|
||||||
return lc.odr
|
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
|
// loadLastState loads the last known chain state from the database. This method
|
||||||
// assumes that the chain manager mutex is held.
|
// assumes that the chain manager mutex is held.
|
||||||
func (lc *LightChain) loadLastState() error {
|
func (lc *LightChain) loadLastState() error {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue