-
Notifications
You must be signed in to change notification settings - Fork 701
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
Log critical consensus values during health checks #2609
Conversation
@@ -556,6 +556,15 @@ func (t *Transitive) HealthCheck(ctx context.Context) (interface{}, error) { | |||
t.Ctx.Lock.Lock() | |||
defer t.Ctx.Lock.Unlock() | |||
|
|||
t.Ctx.Log.Verbo("running health check", |
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.
❤️
return json.Marshal(m.keyToValue) | ||
} | ||
|
||
func (m *BiMap[K, V]) UnmarshalJSON(b []byte) error { |
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.
Where is the custom unmarshaller used?
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.
or is this just moreso ensuring if we add marshal, we should also have unmarshal?
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.
It isn't used. I can remove it if you'd prefer not to have it. Although I felt like implementing json marshal on a normal data structure and not supporting unmarshaling was a bit weird.
Co-authored-by: Dhruba Basu <[email protected]>
Why this should be merged
Adds logging of consensus critical values when performing the health check.
How this works
When verbose logging is enabled, we'll now log critical values like outstanding polls, blocked blocks, and other critical values.
How this was tested
Ran a node with verbose logging and made sure the log showed correctly.