state: Improve replay state logs metadata (#11763)

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
Preston Van Loon 2022-12-13 12:46:51 -06:00 committed by GitHub
parent a15ec49844
commit fbe0672fc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,11 +36,12 @@ func (_ *State) replayBlocks(
var err error var err error
start := time.Now() start := time.Now()
log.WithFields(logrus.Fields{ log = log.WithFields(logrus.Fields{
"startSlot": state.Slot(), "startSlot": state.Slot(),
"endSlot": targetSlot, "endSlot": targetSlot,
"diff": targetSlot - state.Slot(), "diff": targetSlot - state.Slot(),
}).Debug("Replaying state") })
log.Debug("Replaying state")
// The input block list is sorted in decreasing slots order. // The input block list is sorted in decreasing slots order.
if len(signed) > 0 { if len(signed) > 0 {
for i := len(signed) - 1; i >= 0; i-- { for i := len(signed) - 1; i >= 0; i-- {