Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions execution_chain/rpc/common.nim
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ from json_rpc/server import RpcServer, rpc
{.push raises: [].}

type
NodePorts* = object
discovery*: string
listener* : string
NodePorts = object
discovery: int
listener : int

NodeInfo* = object
id* : string # UInt256 hex
Expand Down Expand Up @@ -85,8 +85,8 @@ proc setupAdminRpc*(nimbus: NimbusNode, conf: NimbusConf, server: RpcServer) =
enode: $enode,
ip: $enode.address.ip,
ports: NodePorts(
discovery: $enode.address.udpPort,
listener: $enode.address.tcpPort
discovery: int(enode.address.udpPort),
listener: int(enode.address.tcpPort)
)
)

Expand Down
4 changes: 2 additions & 2 deletions tests/test_rpc.nim
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ proc rpcMain*() =
res.name == env.conf.agentString
res.enode.startsWith("enode://")
res.ip.len > 0
res.ports.discovery.len > 0
res.ports.listener.len > 0
res.ports.discovery > 0
res.ports.listener > 0

test "admin_peers":
let peers = await client.admin_peers()
Expand Down