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

feat: validate tx onchain #112

Merged
merged 1 commit into from
Jul 15, 2024
Merged

Conversation

alexgao001
Copy link
Collaborator

Description

validate tx integrity against chain before persist into DB

Rationale

tell us why we need these changes...

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

@alexgao001 alexgao001 merged commit b376c1c into bnb-chain:master Jul 15, 2024
4 checks passed
return fmt.Errorf("failed to get on chain tx, err=%s", err.Error())
}
if err := l.validateTx(onchainPack, tx); err != nil {
return fmt.Errorf("failed to validate tx, err=%s", err.Error())
Copy link
Contributor

Choose a reason for hiding this comment

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

suggest panic if it does not match, because it is a very serious bug.

alexgao001 added a commit to alexgao001/greenfield-relayer that referenced this pull request Jul 15, 2024
alexgao001 added a commit to alexgao001/greenfield-relayer that referenced this pull request Jul 15, 2024
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