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

Add tick registration mechanism #81

Merged
merged 3 commits into from
Jul 21, 2021
Merged

Add tick registration mechanism #81

merged 3 commits into from
Jul 21, 2021

Conversation

eonwarped
Copy link
Contributor

Register all ticking contracts into "contracts_config" table. Allows for putting more global contract settings in the future. Add "registerTick" method for registering additional ticking actions.

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.

This looks great, should work well! I like how the registerTick action sets the starting block to be the block after it's registered in; that will make things faster for the next release as we can simply wait until all witnesses have upgraded and then register the new tick for donchate's contract.

Some minor points of polish to look at:

  1. contractsConfig can also be used to simplify the big chain of if-else-if for "unknown errors" starting around line 164 of libs/Block.js.

  2. The registerTick action returns empty logs if it succeeds. I think it should generate some logging output with the contract, action, and startRefBlock.

  3. Please fix the lint errors.

@eonwarped
Copy link
Contributor Author

Requested changes done. PTAL

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.

Thanks, revisions look good.

@bt-cryptomancer bt-cryptomancer merged commit f3c328d into hive-engine Jul 21, 2021
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