Skip to content

Commit

Permalink
Allow to manually use disabled providers
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryp Toon committed Dec 17, 2024
1 parent 0dc341e commit fd18a27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions bitcoinlib/services/mempool.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def gettransactions(self, address, after_txid='', limit=MAX_TRANSACTIONS):
if len(prtxs) > 100:
break
txs = []
# FIXME: Mempool return transactions in incorrect order, this tries to fix it, but does not always work...
for tx in sorted(prtxs, key=lambda x: x['status']['block_height']):
t = self._parse_transaction(tx)
if t:
Expand Down
2 changes: 1 addition & 1 deletion bitcoinlib/services/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def __init__(self, network=DEFAULT_NETWORK, min_providers=1, max_providers=1, pr
for p in self.providers_defined:
if ((self.providers_defined[p]['network'] == network or self.providers_defined[p]['network'] == '') and \
(not providers or self.providers_defined[p]['provider'] in providers)
and self.providers_defined[p]['priority']):
and (providers or self.providers_defined[p]['priority'])):
self.providers.update({p: self.providers_defined[p]})
exclude_providers_keys = {pi: self.providers[pi]['provider'] for pi in self.providers if self.providers[pi]['provider'] in exclude_providers}.keys()

Expand Down

0 comments on commit fd18a27

Please sign in to comment.