Skip to content
This repository has been archived by the owner on Feb 11, 2025. It is now read-only.

Modify break statement of nTime loop #46

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions fetchd/fetchd.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,17 @@ def run(feeVerifyTx, feeRecipient, doFetch=False, network=BITCOIN_TESTNET, start
else:
logger.info('@@@@ handle orphan did not succeed iteration {0}'.format(i))
break # start the refetch again, this time ++i
break # chainHead is same realHead

# chainHead is same realHead
if chainHead == realHead:
break

actualHeight = last_block_height(network) # pybitcointools 1.1.33

if startBlock:
instance.heightToStartFetch = startBlock
else:
instance.heightToStartFetch = getLastBlockHeight() + 1
instance.heightToStartFetch = heightToRefetch + 1

logger.info('@@@ startFetch: {0} actualHeight: {1}'.format(instance.heightToStartFetch, actualHeight))

Expand Down