Skip to content

Commit

Permalink
[FIX] Correctly parse arguments in bitcoindclient
Browse files Browse the repository at this point in the history
  • Loading branch information
mccwdev committed Oct 30, 2023
1 parent ae354c9 commit d935eea
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bitcoinlib/services/bitcoind.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class BitcoindClient(BaseClient):
"""

@staticmethod
def from_config(configfile=None, network='bitcoin'):
def from_config(configfile=None, network='bitcoin', **kwargs):
"""
Read settings from bitcoind config file
Expand Down Expand Up @@ -113,17 +113,17 @@ def from_config(configfile=None, network='bitcoin'):
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 BitcoindClient(network, url)
return BitcoindClient(network, url, **kwargs)

def __init__(self, network='bitcoin', base_url='', denominator=100000000, *args):
def __init__(self, network='bitcoin', base_url='', denominator=100000000, **kwargs):
"""
Open connection to bitcoin node
:param network: Bitcoin mainnet or testnet. Default is bitcoin mainnet
:type: str
:param base_url: Connection URL in format http(s)://user:password@host:port.
:type: str
:param denominator: Denominator for this currency. Should be always 100000000 (satoshis) for bitcoin
:param denominator: Denominator for this currency. Should be always 100000000 (Satoshi's) for bitcoin
:type: str
"""
if isinstance(network, Network):
Expand All @@ -134,7 +134,7 @@ def __init__(self, network='bitcoin', base_url='', denominator=100000000, *args)
network = bdc.network
_logger.info("Connect to bitcoind")
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, **kwargs)

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

0 comments on commit d935eea

Please sign in to comment.