functional_tests: support several daemons/wallets

This commit is contained in:
moneromooo-monero
2019-03-18 11:53:47 +00:00
parent 9e979ffa22
commit b2fc571943
3 changed files with 42 additions and 29 deletions

View File

@@ -32,8 +32,8 @@ from .rpc import JSONRPC
class Daemon(object):
def __init__(self, protocol='http', host='127.0.0.1', port=18081):
self.rpc = JSONRPC('{protocol}://{host}:{port}'.format(protocol=protocol, host=host, port=port))
def __init__(self, protocol='http', host='127.0.0.1', port=0, idx=0):
self.rpc = JSONRPC('{protocol}://{host}:{port}'.format(protocol=protocol, host=host, port=port if port else 18180+idx))
def getblocktemplate(self, address):
getblocktemplate = {

View File

@@ -32,8 +32,8 @@ from .rpc import JSONRPC
class Wallet(object):
def __init__(self, protocol='http', host='127.0.0.1', port=18083):
self.rpc = JSONRPC('{protocol}://{host}:{port}'.format(protocol=protocol, host=host, port=port))
def __init__(self, protocol='http', host='127.0.0.1', port=0, idx=0):
self.rpc = JSONRPC('{protocol}://{host}:{port}'.format(protocol=protocol, host=host, port=port if port else 18090+idx))
def make_uniform_destinations(self, address, transfer_amount, transfer_number_of_destinations=1):
destinations = []