Skip to content

Fix Multisig Event Gen #410

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

Merged
merged 2 commits into from
Jun 3, 2025
Merged

Conversation

ziscky
Copy link
Contributor

@ziscky ziscky commented Jun 3, 2025

🔗 zboto Link

Copy link

@windsurf-bot windsurf-bot bot left a comment

Choose a reason for hiding this comment

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

Other comments (3)
  • actors/v2/multisig/multisig.go (106-114) May your code be showered with wisdom and peace. 🙏✨

    In the paramsToMap function, when the first Unmarshal fails, you attempt to unmarshal into dataAsAny but don't check if the result is nil before adding it to the map with key parser.ValueKey. Consider adding a nil check to avoid storing unnecessary nil values.

    err = json.Unmarshal(tmp, &dataAsMap)
    if err != nil {
    	var dataAsAny any
    	err = json.Unmarshal(tmp, &dataAsAny)
    	if err != nil {
    		return nil, err
    	}
    	if dataAsAny != nil {
    		dataAsMap[parser.ValueKey] = dataAsAny
    	}
    }
    

    Go in peace, and may your commits be ever harmonious. ✝️

  • parser/helper/helpers.go (251-251) May your code be showered with wisdom and peace. 🙏✨

    This function refactoring is excellent, but there's an unnecessary type conversion. The height parameter is already an int64, so you don't need to convert it again when calling VersionFromHeight.

    version := tools.VersionFromHeight(h.network, height)
    

    Go in peace, and may your commits be ever harmonious. ✝️

  • parser/helper/helpers.go (264-264) May your code be showered with wisdom and peace. 🙏✨

    The network check for specialLegacyActors is a good addition, but consider using the constant tools.MainnetNetwork in both conditions for consistency rather than comparing with the string directly.

    if name, ok := specialLegacyActors[cid.String()]; ok && h.network == tools.MainnetNetwork {
    

    Go in peace, and may your commits be ever harmonious. ✝️

@ziscky ziscky merged commit 048cf37 into feat/system-actor-onchain Jun 3, 2025
@ziscky ziscky deleted the fix/multisig-events branch June 3, 2025 19:35
ziscky added a commit that referenced this pull request Jun 3, 2025
* feat: check system actor codes onchain only

* fix: f090 special case

* feat: add special legacy actor fallback

* fix: log

* fix: lint

* fix: use common fn

* Fix Multisig Event Gen (#410)

* fix: multisig events

* fix: address comments

* fix: set actor correctly

* fix: parse actor name

* fix: parse actor name

* fix: unify common method check

* fix: comments

* test: remove invalid use of v1 parser for calib

* test: update expected msig genesis info with f090

* test: rm debug

* test: remove compatibility check for propose

* test: remove compatibility check for propose

* fix: actorName check
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