diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2020-04-21 09:03:37 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2020-04-21 09:03:37 -0500 |
| commit | c846c8650eb8a4822f85b8464410fdc6f8e55a8f (patch) | |
| tree | 944e16375599f34b85cec42b6e9aee01c14d00fb /utils/python-rpc/framework | |
| parent | 4540afc51b0ef567ffe00a231bf3b3b518a415c2 (diff) | |
| parent | 571546067f1b1d0f51a2a796e2509c93133e1cf4 (diff) | |
| download | monzero-core-c846c8650eb8a4822f85b8464410fdc6f8e55a8f.tar.gz monzero-core-c846c8650eb8a4822f85b8464410fdc6f8e55a8f.tar.xz monzero-core-c846c8650eb8a4822f85b8464410fdc6f8e55a8f.zip | |
Merge pull request #6445
5715460 Always reject duplicate key-images from second txid (vtnerd)
babf25d Allow unrestricted rpc calls to get full txpool info (vtnerd)
Diffstat (limited to 'utils/python-rpc/framework')
| -rw-r--r-- | utils/python-rpc/framework/daemon.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/python-rpc/framework/daemon.py b/utils/python-rpc/framework/daemon.py index 749d9ed88..074f8de37 100644 --- a/utils/python-rpc/framework/daemon.py +++ b/utils/python-rpc/framework/daemon.py @@ -32,10 +32,11 @@ from .rpc import JSONRPC class Daemon(object): - def __init__(self, protocol='http', host='127.0.0.1', port=0, idx=0): + def __init__(self, protocol='http', host='127.0.0.1', port=0, idx=0, restricted_rpc = False): + base = 18480 if restricted_rpc else 18180 self.host = host self.port = port - self.rpc = JSONRPC('{protocol}://{host}:{port}'.format(protocol=protocol, host=host, port=port if port else 18180+idx)) + self.rpc = JSONRPC('{protocol}://{host}:{port}'.format(protocol=protocol, host=host, port=port if port else base+idx)) def getblocktemplate(self, address, prev_block = "", client = ""): getblocktemplate = { |
