Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

feat: fix account sequence mismatch #101

Open
wants to merge 31 commits into
base: main
Choose a base branch
from

Conversation

gyuguen
Copy link
Contributor

@gyuguen gyuguen commented Nov 9, 2022

Implement

I imporve like below:

  • Added OracleUpgradedEvent
    • This event is raised when the OracleUpgrade is compelete.
    • If is not same one's own uniqueID and active uniqeID, all voteEvents change enable status to false
    • if not, all voteEvent change eanble status to true
  • VoteEvent enable state is true, then the vote is execute. Otherwise, the voting will not be executed.
  • All events added prepare step before subscribing.

@gyuguen gyuguen self-assigned this Nov 9, 2022
@gyuguen gyuguen linked an issue Nov 9, 2022 that may be closed by this pull request
oracleevent.NewRegisterOracleEvent(svc),
oracleevent.NewUpgradeOracleEvent(svc),
datadealevent.NewDataVerificationEvent(svc),
datadealevent.NewDataDeliveryVoteEvent(svc),
}
upgradedOracleEvent := oracleevent.NewUpgradedOracleEvent(svc, voteEvents)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

UpragedOracleEvent need to voteEvents parameter.

}
}

func (e *UpgradedOracleEvent) Prepare() error {
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 function is called before each event subscribes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error occured that "account sequence mismatch"
1 participant