Skip to content

Commit 10a7fc6

Browse files
authored
Update LDPCDifficulty.go
1 parent a94b4ab commit 10a7fc6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

consensus/eccpow/LDPCDifficulty.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func MakeLDPCDifficultyCalculatorAnnapurna() func(time uint64, parent *types.Hea
181181
//fmt.Printf("block_timestamp - parent_timestamp : %v\n", x)
182182

183183
x.Div(x, threshold)
184-
//fmt.Printf("(block_timestamp - parent_timestamp) / 7 : %v\n", x)
184+
//fmt.Printf("(block_timestamp - parent_timestamp) // 7 : %v\n", x)
185185

186186
if parent.UncleHash == types.EmptyUncleHash {
187187
//fmt.Printf("No uncle\n")
@@ -190,9 +190,9 @@ func MakeLDPCDifficultyCalculatorAnnapurna() func(time uint64, parent *types.Hea
190190
//fmt.Printf("Uncle block exists")
191191
x.Sub(big2, x)
192192
}
193-
//fmt.Printf("(2 if len(parent_uncles) else 1) - (block_timestamp - parent_timestamp) / 7 : %v\n", x)
193+
//fmt.Printf("(2 if len(parent_uncles) else 1) - (block_timestamp - parent_timestamp) // 7 : %v\n", x)
194194

195-
// max((2 if len(parent_uncles) else 1) - (block_timestamp - parent_timestamp) // 9, -99)
195+
// max((2 if len(parent_uncles) else 1) - (block_timestamp - parent_timestamp) // 7, -99)
196196
if x.Cmp(bigMinus99) < 0 {
197197
x.Set(bigMinus99)
198198
}
@@ -203,10 +203,10 @@ func MakeLDPCDifficultyCalculatorAnnapurna() func(time uint64, parent *types.Hea
203203
//fmt.Printf("parent.Difficulty / 1024 : %v\n", y)
204204

205205
x.Mul(y, x)
206-
//fmt.Printf("parent.Difficulty / 1024 * max(1 - (block_timestamp - parent_timestamp) / BlockGenerationTime, -99) : %v\n", x)
206+
//fmt.Printf("parent.Difficulty / 1024 * max(1 - (block_timestamp - parent_timestamp) // 7, -99) : %v\n", x)
207207

208208
x.Add(parent.Difficulty, x)
209-
//fmt.Printf("parent.Difficulty - parent.Difficulty / 8 * max(1 - (block_timestamp - parent_timestamp) / BlockGenerationTime, -99) : %v\n", x)
209+
//fmt.Printf("parent.Difficulty - parent.Difficulty / 8 * max(1 - (block_timestamp - parent_timestamp) // 7, -99) : %v\n", x)
210210

211211
// minimum difficulty can ever be (before exponential factor)
212212
if x.Cmp(SeoulDifficulty) < 0 {
@@ -259,4 +259,4 @@ func SearchLevel_Seoul(difficulty *big.Int) int {
259259
}
260260

261261
return level
262-
}
262+
}

0 commit comments

Comments
 (0)