Skip to content
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

adding events in key places #546

Merged
merged 7 commits into from Feb 14, 2019
Merged

adding events in key places #546

merged 7 commits into from Feb 14, 2019

Conversation

zalmen
Copy link
Contributor

@zalmen zalmen commented Feb 14, 2019

No description provided.

y0sher
y0sher previously approved these changes Feb 14, 2019
mesh/block.go Outdated
@@ -36,6 +36,18 @@ type SerializableTransaction struct {
Payload []byte
}

func (t *SerializableTransaction) GetAmount() *big.Int {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amount is better

if err != nil {
tp.Log.Error("db write error %v", err)
return failed, err
}

tp.Log.Info("new state root for layer %v is %x", layer, newHash)
tp.Log.With().Info("new state", log.Uint32("layer id", uint32(layer)), log.String("root hash", newHash.String()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

layer id and root hash will be used as json keys. it is less recommended that they have space. replace with _

if err != nil {
panic("cannot revert- improper state")
}
tp.Log.Info("reverted, new root %x", newState.IntermediateRoot(false))
tp.Log.With().Info("reverted", log.String("root hash", newState.IntermediateRoot(false).String()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace space here also

Copy link
Contributor

@y0sher y0sher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All your added log lines are at the Info level. is this the right level ? info is shown in all of our current setup.
consider downgrading to debug. (will be shown when debug mode is on)

@y0sher y0sher dismissed their stale review February 14, 2019 13:17

added more comments adter changes

@antonlerner antonlerner merged commit efc47ef into develop Feb 14, 2019
@y0sher y0sher deleted the json-messages branch June 25, 2019 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants