From eab04af9c90277a50e38d83eb886351ab3ba6593 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Tue, 21 May 2019 15:06:02 -0700 Subject: [PATCH] [rpc] increase the offset of rpc port The 10/20 offset will upset local test with more than 10 nodes being launched. The error I encountered is like: panic: failed to listen on any addresses: [listen tcp4 0.0.0.0:9015: bind: address already in use] goroutine 1 [running]: github.com/harmony-one/harmony/p2p/host/hostv2.catchError(...) /Users/leochen/work/go/src/github.com/harmony-one/harmony/p2p/host/hostv2/util.go:10 Signed-off-by: Leo Chen --- node/rpc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/rpc.go b/node/rpc.go index 1fbb83252..9d99f4341 100644 --- a/node/rpc.go +++ b/node/rpc.go @@ -13,8 +13,8 @@ import ( ) const ( - rpcHTTPPortOffset = 10 - rpcWSPortOffset = 20 + rpcHTTPPortOffset = 500 + rpcWSPortOffset = 800 ) var (