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 HF26 breaking change for beneficiaries in Streamer.js #153

Merged
merged 1 commit into from Jul 25, 2022

Conversation

primersion
Copy link

In HF26 the form beneficiaries are handled has changed (breaking change), which results in hive-engine nodes diverging, due to the beneficiaires not being parsed correctly.
Before the beneficiary format was the following:

"extensions": [
    [
      0,
      {
        "beneficiaries": [
          {
            "account": "alinares",
            "weight": 300
          },
          {
            "account": "hiveonboard",
            "weight": 100
          },
          {
            "account": "tipu",
            "weight": 100
          }]
      }]
  ]
}]
],

and after HF26:

"extensions": [
    {
      "type": "comment_payout_beneficiaries",
      "value": {
        "beneficiaries": [
          {
            "account": "alinares",
            "weight": 300
          },
          {
            "account": "hiveonboard",
            "weight": 100
          },
          {
            "account": "tipu",
            "weight": 100
          }]
      }
    }]
}]
],

The change adds an additional if case parsing the new beneficiary format.

@primersion
Copy link
Author

I have been running the change against a HF26 node for the past 12 hours, all without issues and the node is still in sync, so the change should be all good in my opinion.

Copy link
Collaborator

@bt-cryptomancer bt-cryptomancer left a comment

Choose a reason for hiding this comment

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

Changes look good.

@bt-cryptomancer bt-cryptomancer merged commit c2244e7 into hive-engine:hive-engine Jul 25, 2022
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.

None yet

3 participants