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

fix empty topics in a non-breaking way #35

Merged
merged 1 commit into from
Dec 14, 2021

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented Dec 14, 2021

related: evmos#840

Description


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

Copy link

@calvinaco calvinaco left a comment

Choose a reason for hiding this comment

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

Left a comment on the range loop.

ethLogs := evmtypes.LogsToEthereum(logs)
for _, log := range ethLogs {
if log.Topics == nil {
log.Topics = make([]common.Hash, 0)

Choose a reason for hiding this comment

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

It is safer to do

			ethLogs[i].Topics = make([]common.Hash, 0)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

Copy link

@calvinaco calvinaco left a comment

Choose a reason for hiding this comment

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

LGTM

@yihuang yihuang merged commit 6defb50 into crypto-org-chain:master Dec 14, 2021
@yihuang yihuang deleted the crypto-org-main branch December 14, 2021 07:49
@thomas-nguy
Copy link
Collaborator

Can you add an entry to the changelog?

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