-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add log for missed block detection #1471
Conversation
Codecov ReportBase: 40.18% // Head: 40.09% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1471 +/- ##
==========================================
- Coverage 40.18% 40.09% -0.09%
==========================================
Files 147 147
Lines 9651 9705 +54
==========================================
+ Hits 3878 3891 +13
- Misses 5144 5189 +45
+ Partials 629 625 -4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
pkg/core/chain/chain.go
Outdated
@@ -509,6 +521,12 @@ func (c *Chain) runStateTransition(tipBlk, blk block.Block) (*block.Block, error | |||
WithField("state_hash", util.StringifyBytes(respStateHash)).WithField("e_prov", eligibleProvisioners). | |||
Info("state transition completed") | |||
|
|||
provisioner, _ := base58.Encode(blk.Header.GeneratorBlsPubkey) | |||
logger.WithField("provisioner", provisioner). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: Should we name it block_generator or just "generator" instead of "provisioner"?
pkg/core/chain/chain.go
Outdated
for iteration := uint8(0); iteration < missedIterations; iteration++ { | ||
step := iteration*3 + 1 | ||
committee := c.p.CreateVotingCommittee(tipBlk.Header.Seed, blk.Header.Height, step, config.ConsensusSelectionMaxCommitteeSize) | ||
expectedkey, _ := base58.Encode(committee.MemberKeys()[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a rule of thumb, always ensure "committee.MemberKeys()" is not empty.
See also #1448
Resolves #1470