2018-06-20 17:27:32 +00:00
|
|
|
# Nimbus
|
|
|
|
# Copyright (c) 2018 Status Research & Development GmbH
|
|
|
|
# Licensed under either of
|
|
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
|
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
|
|
|
|
# at your option.
|
|
|
|
# This file may not be copied, modified, or distributed except according to
|
|
|
|
# those terms.
|
2018-07-20 07:57:51 +00:00
|
|
|
import nimcrypto, json_rpc/server, eth_p2p
|
2018-06-20 17:27:32 +00:00
|
|
|
import ../config
|
|
|
|
|
2018-07-12 11:14:04 +00:00
|
|
|
proc setupP2PRPC*(server: EthereumNode, rpcsrv: RpcServer) =
|
2018-07-22 21:34:43 +00:00
|
|
|
rpcsrv.rpc("net_version") do() -> uint:
|
2018-06-20 17:27:32 +00:00
|
|
|
let conf = getConfiguration()
|
|
|
|
result = conf.net.networkId
|