Skip to content

Commit

Permalink
Strange hack to let blockstream provider work
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryp Toon committed Oct 8, 2024
1 parent cc81fb9 commit 310f53a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bitcoinlib/services/blockstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ def gettransactions(self, address, after_txid='', limit=MAX_TRANSACTIONS):
if len(prtxs) > limit:
break
txs = []
prtxs.sort(key=lambda x: x['status']['block_height'])
if len(set([x['status']['block_height'] for x in prtxs])) > 1:
prtxs.sort(key=lambda x: x['status']['block_height'])
else:
prtxs = prtxs[::-1]
for tx in prtxs:
t = self._parse_transaction(tx)
if t:
Expand Down

0 comments on commit 310f53a

Please sign in to comment.