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

Improve logging at SendMsgs and GetMsgResult #44

Merged
merged 6 commits into from
May 28, 2024

Conversation

siburu
Copy link
Contributor

@siburu siburu commented May 23, 2024

No description provided.

@siburu siburu force-pushed the improve-sendmsgs-logging branch from b967b70 to 5152347 Compare May 23, 2024 00:45
@siburu siburu requested review from bluele and mizuochik May 23, 2024 01:22
if err2 != nil {
logger.Error("failed to get revert reason", err2, "msg_index", i)
var revertReason, rawErrorData string
if reason, data, err := c.getRevertReasonFromEstimateGas(err); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

@siburu We should include raw error data in the log even if the `ErrorRepository's parser function returns an error.

Copy link
Contributor Author

@siburu siburu May 23, 2024

Choose a reason for hiding this comment

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

@bluele I'm very sorry ... I fixed it.
f0ac44f

@siburu siburu requested a review from bluele May 23, 2024 04:01
txGasLimit = c.Config().MaxGasLimit
}
opts.GasLimit = txGasLimit
opts.NoSend = false
tx, err = c.SendTx(opts, msg, skipUpdateClientCommitment)
if bz, err := tx.MarshalBinary(); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

@siburu If the tx is nil(and err !=nil) at line 96, doest it cause a nil reference error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bluele I'm very sorry. I have fixed it. 5178fa5

@siburu siburu requested a review from bluele May 23, 2024 05:23
Copy link
Member

@bluele bluele left a comment

Choose a reason for hiding this comment

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

LGTM👍

@siburu siburu merged commit 1db9ee9 into datachainlab:main May 28, 2024
1 check passed
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.

3 participants