Skip to content
This repository was archived by the owner on Aug 8, 2018. It is now read-only.

Commit 00b0c04

Browse files
committed
changed the host format for easier
1 parent 6cbc33a commit 00b0c04

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

pyethapp/rpc_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ class JSONRPCClientReplyError(Exception):
5656
class JSONRPCClient(object):
5757
protocol = JSONRPCProtocol()
5858

59-
def __init__(self, host='http://127.0.0.1', port=4000, print_communication=True, privkey=None, sender=None):
59+
def __init__(self, host='127.0.0.1', port=4000, print_communication=True, privkey=None, sender=None):
6060
"specify privkey for local signing"
61-
self.transport = HttpPostClientTransport('{}:{}'.format(host, port))
61+
self.transport = HttpPostClientTransport('http://{}:{}'.format(host, port))
6262
self.print_communication = print_communication
6363
self.privkey = privkey
6464
self._sender = sender

pyethapp/tests/test_rpc_client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ def test_find_block():
77

88

99
def test_default_host():
10-
default_host = 'http://127.0.0.1'
10+
default_host = '127.0.0.1'
1111
client = JSONRPCClient()
12-
assert client.transport.endpoint == '{}:{}'.format(default_host, client.port)
12+
assert client.transport.endpoint == 'http://{}:{}'.format(default_host, client.port)
1313

1414

1515
def test_set_host():
16-
host = 'http://1.1.1.1'
17-
default_host = 'http://127.0.0.1'
16+
host = '1.1.1.1'
17+
default_host = '127.0.0.1'
1818
client = JSONRPCClient(host)
19-
assert client.transport.endpoint == '{}:{}'.format(host, client.port)
20-
assert client.transport.endpoint != '{}:{}'.format(default_host, client.port)
19+
assert client.transport.endpoint == 'http://{}:{}'.format(host, client.port)
20+
assert client.transport.endpoint != 'http://{}:{}'.format(default_host, client.port)

0 commit comments

Comments
 (0)