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: make handleCreateBucketSynPackage forward compatible #509

Merged
merged 3 commits into from
Oct 23, 2023

Conversation

pythonberg1997
Copy link
Contributor

@pythonberg1997 pythonberg1997 commented Oct 20, 2023

Description

This pr is to fix the forward incompatibility of handleCreateBucketSynPackage

Rationale

To make the chain forward compatible

Example

The chain can handle CreateBucketSynPackage with or without GlobalVirtualGroupFamilyId

Changes

Notable changes:

  • add handleCreateBucketSynPackageV2

@pythonberg1997 pythonberg1997 force-pushed the develop branch 2 times, most recently from 33a071a to 9e7fe74 Compare October 20, 2023 14:54
@unclezoro
Copy link
Collaborator

Looks good to me, please ensure it is well tested locally.

@@ -140,6 +196,24 @@ func DeserializeCrossChainPackage(rawPack []byte, channelId sdk.ChannelID, packa
return operationMap[packageType](pack.Package)
}

func DeserializeCrossChainPackageV2(rawPack []byte, channelId sdk.ChannelID, packageType sdk.CrossChainPackageType) (interface{}, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we reuse DeserializeCrossChainPackage or extract another method to reduce duplicated codes?

@pythonberg1997 pythonberg1997 added this pull request to the merge queue Oct 23, 2023
Merged via the queue into bnb-chain:develop with commit 3819c93 Oct 23, 2023
5 checks 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.

4 participants