internal/ethapi: restore net_version RPC method (#22061)

During the snap and eth refactor, the net_version rpc call was falsely deprecated.
This restores the net_version RPC handler as most eth2 nodes and other software
depend on it.
This commit is contained in:
Marius van der Wijden
2020-12-23 13:43:22 +01:00
committed by GitHub
parent 61469cfeaf
commit 158f72cc0c
3 changed files with 11 additions and 5 deletions

View File

@ -171,7 +171,7 @@ func New(stack *node.Node, config *eth.Config) (*LightEthereum, error) {
leth.blockchain.DisableCheckFreq()
}
leth.netRPCService = ethapi.NewPublicNetAPI(leth.p2pServer)
leth.netRPCService = ethapi.NewPublicNetAPI(leth.p2pServer, leth.config.NetworkId)
// Register the backend on the node
stack.RegisterAPIs(leth.APIs())