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

Prevent inserting token transfers with invalid blockchain event refs #1386

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

awrichar
Copy link
Contributor

@awrichar awrichar commented Aug 1, 2023

If an existing blockchain event is found, be sure to look up and use the existing ID when inserting token transfers/approvals.

Fixes #1385

If an existing blockchain event is found, be sure to look up and use the
existing ID when inserting token transfers/approvals.

Fixes hyperledger#1385

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>

err := em.maybePersistBlockchainEvent(em.ctx, ev, nil)
assert.NoError(t, err)
assert.Equal(t, existingID, ev.ID)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This (important) test condition got lost in a previous PR. Making this true again is really the singular focus of this PR.

@nguyer nguyer merged commit 8327db8 into hyperledger:main Aug 1, 2023
14 checks passed
@nguyer nguyer deleted the blockchain-existing branch August 1, 2023 16:39
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.

Some token transfers are inserted with a broken link to blockchain events
2 participants