Skip to content

Commit bd4fb43

Browse files
Merge pull request 'Fix halving if block failed' (#106) from 20230628.errata into main
Reviewed-on: local as 106
2 parents fc53d95 + 50c3a45 commit bd4fb43

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ title: NODEYEZ Change Log
33
---
44
# CHANGELOG
55

6-
## main | baseclass
7-
8-
TODO
9-
- update image samples
6+
## main
107

118
**New Panels and Ehancements**
129

scripts/halving.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def run(self):
227227
blocksToGo = halvingend + 1 - self.blockheight
228228
currentTime = int(time.time())
229229
secondsPassed = currentTime - self.halvingBeganTime
230-
avgBlockTime = secondsPassed / self.halvingBlocksMined
230+
avgBlockTime = 600 if self.halvingBeganTime == 0 else secondsPassed / self.halvingBlocksMined
231231
secondsRemain = avgBlockTime * blocksToGo
232232
if blocksToGo % 4 == 0:
233233
# block height

0 commit comments

Comments
 (0)