This repository was archived by the owner on May 21, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ web3._extend({
7474 name: 'getSnapshot',
7575 call: 'clique_getSnapshot',
7676 params: 1,
77- inputFormatter: [null ]
77+ inputFormatter: [web3._extend.utils.fromDecimal ]
7878 }),
7979 new web3._extend.Method({
8080 name: 'getSnapshotAtHash',
@@ -85,7 +85,7 @@ web3._extend({
8585 name: 'getSigners',
8686 call: 'clique_getSigners',
8787 params: 1,
88- inputFormatter: [null ]
88+ inputFormatter: [web3._extend.utils.fromDecimal ]
8989 }),
9090 new web3._extend.Method({
9191 name: 'getSignersAtHash',
@@ -102,6 +102,11 @@ web3._extend({
102102 call: 'clique_discard',
103103 params: 1
104104 }),
105+ new web3._extend.Method({
106+ name: 'status',
107+ call: 'clique_status',
108+ params: 0
109+ }),
105110 ],
106111 properties: [
107112 new web3._extend.Property({
Original file line number Diff line number Diff line change @@ -176,7 +176,9 @@ func (s *LightDummyAPI) Mining() bool {
176176// APIs returns the collection of RPC services the ethereum package offers.
177177// NOTE, some of these services probably need to be moved to somewhere else.
178178func (s * LightEthereum ) APIs () []rpc.API {
179- return append (ethapi .GetAPIs (s .ApiBackend ), []rpc.API {
179+ apis := ethapi .GetAPIs (s .ApiBackend )
180+ apis = append (apis , s .engine .APIs (s .BlockChain ().HeaderChain ())... )
181+ return append (apis , []rpc.API {
180182 {
181183 Namespace : "eth" ,
182184 Version : "1.0" ,
Original file line number Diff line number Diff line change @@ -143,6 +143,11 @@ func (lc *LightChain) Odr() OdrBackend {
143143 return lc .odr
144144}
145145
146+ // HeaderChain returns the underlying header chain.
147+ func (lc * LightChain ) HeaderChain () * core.HeaderChain {
148+ return lc .hc
149+ }
150+
146151// loadLastState loads the last known chain state from the database. This method
147152// assumes that the chain manager mutex is held.
148153func (lc * LightChain ) loadLastState () error {
You can’t perform that action at this time.
0 commit comments