Skip to content

Commit

Permalink
Fix reorg issues
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptoManiac committed Jul 30, 2015
1 parent 83c2306 commit b086763
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backends/bitcoind/blockchain_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,10 +627,11 @@ def catch_up(self, sync=True):
self.up_to_date = False
try:
next_block = self.bitcoind('getblockbynumber', [self.storage.height + 1, True])
next_block_hash = next_block.get('hash')
except BaseException, e:
next_block = self.bitcoind('getblock', [self.storage.last_hash, True])
revert = True
next_block = next_block.get(self.storage.last_hash)

next_block_hash = next_block.get('hash')

self.mtime('daemon')

Expand Down

0 comments on commit b086763

Please sign in to comment.