Skip to content

Commit

Permalink
miner log tweaking
Browse files Browse the repository at this point in the history
  • Loading branch information
countvonzero committed Aug 20, 2023
1 parent 8a143ce commit e0b7fc3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions miner/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (o *Oracle) activeSet(targetEpoch types.EpochID) (uint64, uint64, types.ATX
return 0, 0, types.EmptyATXID, nil, err
}

Check warning on line 191 in miner/oracle.go

View check run for this annotation

Codecov / codecov/patch

miner/oracle.go#L190-L191

Added lines #L190 - L191 were not covered by tests
o.log.With().Info("miner not synced during prior epoch, active set from first block",
log.Int("num atx", len(atxids)),
log.Int("all atx", total),
log.Int("num omitted", numOmitted),
log.Int("num block atx", len(atxids)),
)
Expand All @@ -209,11 +209,11 @@ func refBallot(db sql.Executor, epoch types.EpochID, nodeID types.NodeID) (*type
return nil, nil
}
if err != nil {
return nil, fmt.Errorf("failed to get refballot: %w", err)
return nil, fmt.Errorf("miner get refballot: %w", err)
}

Check warning on line 213 in miner/oracle.go

View check run for this annotation

Codecov / codecov/patch

miner/oracle.go#L212-L213

Added lines #L212 - L213 were not covered by tests
ballot, err := ballots.Get(db, ref)
if err != nil {
return nil, fmt.Errorf("failed to get ballot: %w", err)
return nil, fmt.Errorf("miner get ballot: %w", err)
}

Check warning on line 217 in miner/oracle.go

View check run for this annotation

Codecov / codecov/patch

miner/oracle.go#L216-L217

Added lines #L216 - L217 were not covered by tests
return ballot, nil
}
Expand All @@ -235,11 +235,11 @@ func (o *Oracle) calcEligibilityProofs(lid types.LayerID, epoch types.EpochID, b
minerWeight, totalWeight, ownAtx, activeSet, err = o.activeSet(epoch)
} else {
activeSet = ref.ActiveSet
minerWeight, totalWeight, ownAtx, err = infoFromActiveSet(o.cdb, o.vrfSigner.NodeID(), activeSet)
o.log.With().Info("use active set from ref ballot",
ref.ID(),
log.Int("num atx", len(activeSet)),
)
minerWeight, totalWeight, ownAtx, err = infoFromActiveSet(o.cdb, o.vrfSigner.NodeID(), activeSet)
}
if err != nil {
return nil, err
Expand Down

0 comments on commit e0b7fc3

Please sign in to comment.