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

log rawTx when fail to send tx #51

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

dai1975
Copy link
Contributor

@dai1975 dai1975 commented Jul 25, 2024

log rawTx when fail to send tx

Signed-off-by: Daisuke Kanda <[email protected]>
@dai1975 dai1975 requested a review from siburu July 25, 2024 04:05
@dai1975 dai1975 force-pushed the features/lo4500-log-tx branch from e6e7108 to 21ec2bc Compare July 26, 2024 02:01
@@ -2,7 +2,7 @@ package ethereum

const (
logAttrMsgIndexFrom = "msg_index_from"
logAttrMsgIndexTo = "msg_index_to"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

change info for readers to avoid from confusing to is inclusive or not.

@@ -406,7 +413,7 @@ func (c *Chain) getRevertReasonFromReceipt(ctx context.Context, receipt *client.

func (c *Chain) getRevertReasonFromRpcError(err error) (string, []byte, error) {
if de, ok := err.(rpc.DataError); !ok {
return "", nil, fmt.Errorf("failed with unexpected error type: errorType=%T", err)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

output normal log in case of failing to rpc call itself.

iter.cursor = min(len(iter.msgs), iter.cursor + n)
}

func (iter *CallIter) updateLoggerMessageInfo(logger *log.RelayLogger, from int, count int) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Being buildTx more common function, caller of buildTx need to add info of msgs in using buildTx to logger.
This is helper function for it.

Copy link
Contributor

@siburu siburu left a comment

Choose a reason for hiding this comment

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

@dai1975 Thank you for the PR. I left some comments.

pkg/relay/ethereum/tx.go Outdated Show resolved Hide resolved
pkg/relay/ethereum/tx.go Outdated Show resolved Hide resolved
pkg/relay/ethereum/tx.go Outdated Show resolved Hide resolved
pkg/relay/ethereum/tx.go Show resolved Hide resolved
Signed-off-by: Daisuke Kanda <[email protected]>
@dai1975 dai1975 force-pushed the features/lo4500-log-tx branch from 5eefac0 to b1c9fd7 Compare August 5, 2024 08:33
Copy link
Contributor

@siburu siburu left a comment

Choose a reason for hiding this comment

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

@dai1975 LGTM. Thank you!

@siburu siburu merged commit 5c6d936 into datachainlab:main Aug 7, 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.

2 participants