Skip to content

Commit

Permalink
[FIX] Also fix arguments in Litecoind and other clients
Browse files Browse the repository at this point in the history
  • Loading branch information
mccwdev committed Oct 30, 2023
1 parent d935eea commit 9de639b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions bitcoinlib/services/dashd.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class DashdClient(BaseClient):
"""

@staticmethod
def from_config(configfile=None, network='dash'):
def from_config(configfile=None, network='dash', **kargs):
"""
Read settings from dashd config file
Expand Down Expand Up @@ -104,9 +104,9 @@ def from_config(configfile=None, network='dash'):
elif 'externalip' in config['rpc']:
server = config.get('rpc', 'externalip')
url = "http://%s:%s@%s:%s" % (config.get('rpc', 'rpcuser'), config.get('rpc', 'rpcpassword'), server, port)
return DashdClient(network, url)
return DashdClient(network, url, **kargs)

def __init__(self, network='dash', base_url='', denominator=100000000, *args):
def __init__(self, network='dash', base_url='', denominator=100000000, **kargs):
"""
Open connection to dashcore node
Expand All @@ -123,7 +123,7 @@ def __init__(self, network='dash', base_url='', denominator=100000000, *args):
network = bdc.network
_logger.info("Connect to dashd")
self.proxy = AuthServiceProxy(base_url)
super(self.__class__, self).__init__(network, PROVIDERNAME, base_url, denominator, *args)
super(self.__class__, self).__init__(network, PROVIDERNAME, base_url, denominator, **kargs)

def _parse_transaction(self, tx, block_height=None, get_input_values=True):
t = Transaction.parse_hex(tx['hex'], strict=self.strict, network=self.network)
Expand Down
8 changes: 4 additions & 4 deletions bitcoinlib/services/dogecoind.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class DogecoindClient(BaseClient):
"""

@staticmethod
def from_config(configfile=None, network='dogecoin'):
def from_config(configfile=None, network='dogecoin', **kargs):
"""
Read settings from dogecoind config file
Expand Down Expand Up @@ -113,9 +113,9 @@ def from_config(configfile=None, network='dogecoin'):
server = _read_from_config(config, 'rpc', 'externalip', server)

url = "http://%s:%s@%s:%s" % (config.get('rpc', 'rpcuser'), config.get('rpc', 'rpcpassword'), server, port)
return DogecoindClient(network, url)
return DogecoindClient(network, url, **kargs)

def __init__(self, network='dogecoin', base_url='', denominator=100000000, *args):
def __init__(self, network='dogecoin', base_url='', denominator=100000000, **kargs):
"""
Open connection to dogecoin node
Expand All @@ -141,7 +141,7 @@ def __init__(self, network='dogecoin', base_url='', denominator=100000000, *args
"Please replace default password and set url in providers.json or dogecoin.conf file")
_logger.info("Connect to dogecoind")
self.proxy = AuthServiceProxy(base_url)
super(self.__class__, self).__init__(network, PROVIDERNAME, base_url, denominator, *args)
super(self.__class__, self).__init__(network, PROVIDERNAME, base_url, denominator, **kargs)

def getutxos(self, address, after_txid='', max_txs=MAX_TRANSACTIONS):
txs = []
Expand Down
8 changes: 4 additions & 4 deletions bitcoinlib/services/litecoind.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class LitecoindClient(BaseClient):
"""

@staticmethod
def from_config(configfile=None, network='litecoin'):
def from_config(configfile=None, network='litecoin', **kargs):
"""
Read settings from litecoind config file
Expand Down Expand Up @@ -112,9 +112,9 @@ def from_config(configfile=None, network='litecoin'):
server = _read_from_config(config, 'rpc', 'bind', server)
server = _read_from_config(config, 'rpc', 'externalip', server)
url = "http://%s:%s@%s:%s" % (config.get('rpc', 'rpcuser'), config.get('rpc', 'rpcpassword'), server, port)
return LitecoindClient(network, url)
return LitecoindClient(network, url, **kargs)

def __init__(self, network='litecoin', base_url='', denominator=100000000, *args):
def __init__(self, network='litecoin', base_url='', denominator=100000000, **kargs):
"""
Open connection to litecoin node
Expand All @@ -133,7 +133,7 @@ def __init__(self, network='litecoin', base_url='', denominator=100000000, *args
network = bdc.network
_logger.info("Connect to litecoind")
self.proxy = AuthServiceProxy(base_url)
super(self.__class__, self).__init__(network, PROVIDERNAME, base_url, denominator, *args)
super(self.__class__, self).__init__(network, PROVIDERNAME, base_url, denominator, **kargs)

def getbalance(self, addresslist):
balance = 0
Expand Down

0 comments on commit 9de639b

Please sign in to comment.