Skip to content

Commit

Permalink
Default totalDifficulty to 0 when fetching Fast Sync settings (#7785)
Browse files Browse the repository at this point in the history
  • Loading branch information
emlautarom1 authored Nov 21, 2024
1 parent 5d7894c commit f79325c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/syncSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def fastBlocksSettings(configuration, apiUrl, blockReduced, multiplierRequiremen
pivot = json.loads(requests.post(apiUrl, headers=headers, data=data).text)

pivotHash = pivot['result']['hash']
pivotTotalDifficulty = int(pivot['result']['totalDifficulty'],16)
pivotTotalDifficulty = int(pivot['result'].get('totalDifficulty', '0x0'), 16)
print(configuration + 'LatestBlock: ' + str(latestBlock))
print(configuration + 'PivotNumber: ' + str(baseBlock))
print(configuration + 'PivotHash: ' + str(pivotHash))
Expand Down

0 comments on commit f79325c

Please sign in to comment.