enable unsafe rpc routes in tests via flag

This commit is contained in:
Ethan Buchman
2017-05-26 14:20:23 -04:00
parent bd7ec18c19
commit ee88272216
5 changed files with 9 additions and 5 deletions

View File

@@ -322,6 +322,10 @@ func (n *Node) startRPC() ([]net.Listener, error) {
n.ConfigureRPC()
listenAddrs := strings.Split(n.config.RPC.ListenAddress, ",")
if n.config.RPC.Unsafe {
rpccore.AddUnsafeRoutes()
}
// we may expose the rpc over both a unix and tcp socket
listeners := make([]net.Listener, len(listenAddrs))
for i, listenAddr := range listenAddrs {