@@ -95,6 +95,8 @@ func (t *Tracker) importPerformanceFactor(reader io.ReadSeeker) error {
95
95
return ierrors .Wrapf (err , "unable to store performance factor for account %s and slot index %d" , accountID , slot )
96
96
}
97
97
98
+ t .LogDebug ("Importing performance factor" , "accountID" , accountID , "slot" , slot , "performanceFactor" , performanceFactor )
99
+
98
100
return nil
99
101
}); err != nil {
100
102
return ierrors .Wrapf (err , "unable to read performance factors for slot %d" , slot )
@@ -131,6 +133,8 @@ func (t *Tracker) importPoolRewards(reader io.ReadSeeker) error {
131
133
return ierrors .Wrapf (err , "unable to read reward for account %s and epoch index %d" , accountID , epoch )
132
134
}
133
135
136
+ t .LogDebug ("Importing reward" , "accountID" , accountID , "epoch" , epoch , "reward" , reward )
137
+
134
138
if err = rewardsTree .Set (accountID , reward ); err != nil {
135
139
return ierrors .Wrapf (err , "unable to set reward for account %s and epoch index %d" , accountID , epoch )
136
140
}
@@ -168,6 +172,8 @@ func (t *Tracker) importPoolsStats(reader io.ReadSeeker) error {
168
172
return ierrors .Wrapf (err , "unable to store pool stats for the epoch index %d" , epoch )
169
173
}
170
174
175
+ t .LogDebug ("Importing pool stats" , "epoch" , epoch , "poolStats" , poolStats )
176
+
171
177
return nil
172
178
}); err != nil {
173
179
return ierrors .Wrap (err , "unable to read pool stats collection" )
@@ -206,6 +212,8 @@ func (t *Tracker) importCommittees(reader io.ReadSeeker) error {
206
212
committee .SetReused ()
207
213
}
208
214
215
+ t .LogDebug ("Importing committee" , "epoch" , epoch , "committee" , committee )
216
+
209
217
if err = t .committeeStore .Store (epoch , committee ); err != nil {
210
218
return ierrors .Wrap (err , "unable to store committee" )
211
219
}
@@ -247,6 +255,8 @@ func (t *Tracker) exportPerformanceFactor(writer io.WriteSeeker, startSlot iotag
247
255
return ierrors .Wrapf (err , "unable to write performance factor for accountID %s and slot index %d" , accountID , currentSlot )
248
256
}
249
257
258
+ t .LogDebug ("Exporting performance factor" , "accountID" , accountID , "slot" , currentSlot , "performanceFactor" , pf )
259
+
250
260
accountsCount ++
251
261
252
262
return nil
@@ -292,9 +302,12 @@ func (t *Tracker) exportPoolRewards(writer io.WriteSeeker, targetEpoch iotago.Ep
292
302
}
293
303
// if the map was not present in storage we can skip this epoch
294
304
if ! rewardsMap .WasRestoredFromStorage () {
305
+ t .LogDebug ("Skipping epoch" , "epoch" , epoch , "reason" , "not restored from storage" )
295
306
continue
296
307
}
297
308
309
+ t .LogDebug ("Exporting Pool Rewards" , "epoch" , epoch )
310
+
298
311
if err := stream .Write (writer , epoch ); err != nil {
299
312
return 0 , ierrors .Wrapf (err , "unable to write epoch index for epoch index %d" , epoch )
300
313
}
@@ -311,6 +324,8 @@ func (t *Tracker) exportPoolRewards(writer io.WriteSeeker, targetEpoch iotago.Ep
311
324
return ierrors .Wrapf (err , "unable to write account rewards for epoch index %d and accountID %s" , epoch , key )
312
325
}
313
326
327
+ t .LogDebug ("Exporting Pool Reward" , "epoch" , epoch , "accountID" , key , "rewards" , value )
328
+
314
329
accountCount ++
315
330
316
331
return nil
@@ -347,6 +362,7 @@ func (t *Tracker) exportPoolsStats(writer io.WriteSeeker, targetEpoch iotago.Epo
347
362
348
363
if epoch > targetEpoch {
349
364
// continue
365
+ t .LogDebug ("Skipping epoch" , "epoch" , epoch , "reason" , "epoch is greater than target epoch" )
350
366
return nil
351
367
}
352
368
@@ -358,6 +374,8 @@ func (t *Tracker) exportPoolsStats(writer io.WriteSeeker, targetEpoch iotago.Epo
358
374
return ierrors .Wrapf (err , "unable to write pools stats for epoch %d" , epoch )
359
375
}
360
376
377
+ t .LogDebug ("Exporting Pool Stats" , "epoch" , epoch , "poolStats" , lo .Return1 (model .PoolsStatsFromBytes (value )))
378
+
361
379
epochCount ++
362
380
363
381
return nil
@@ -399,6 +417,7 @@ func (t *Tracker) exportCommittees(writer io.WriteSeeker, targetSlot iotago.Slot
399
417
// - we were able to rotate a committee, then we export it
400
418
// - we were not able to rotate a committee (reused), then we don't export it
401
419
if epoch > epochFromTargetSlot && targetSlot < pointOfNoReturn && committee .IsReused () {
420
+ t .LogDebug ("Skipping committee" , "epoch" , epoch , "reason" , "epoch is greater than target epoch and committee is reused" )
402
421
return nil
403
422
}
404
423
@@ -427,6 +446,8 @@ func (t *Tracker) exportCommittees(writer io.WriteSeeker, targetSlot iotago.Slot
427
446
return ierrors .Wrapf (err , "unable to write reused flag for epoch %d" , epoch )
428
447
}
429
448
449
+ t .LogDebug ("Exporting committee" , "epoch" , epoch , "committee" , committee )
450
+
430
451
epochCount ++
431
452
432
453
return nil
0 commit comments