Allow unrestricted rpc calls to get full txpool info

This commit is contained in:
Lee Clagett 2020-03-26 12:24:11 +00:00
parent 57854a3e21
commit babf25d2ec
6 changed files with 49 additions and 27 deletions

View file

@ -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 = {