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

Promisify runTx internals #493

Merged
merged 2 commits into from
Apr 10, 2019
Merged

Promisify runTx internals #493

merged 2 commits into from
Apr 10, 2019

Conversation

s1na
Copy link
Contributor

@s1na s1na commented Apr 9, 2019

Promisifies the internals of runTx by introducing an async method _runTx which runTx calls. For now most of the code which was in runTx is inside _runTx as is, without breaking them into separate methods. I'm thinking of abstracting some common patterns (between runTx, Interpreter and runBlock) e.g. updating an account's balance in future.

(To be merged into #479)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 95.246% when pulling 139ea6d on refactor/runTx into ac60927 on v4.

@holgerd77
Copy link
Member

Can you explain the purpose/motivation for this a bit more?

@s1na
Copy link
Contributor Author

s1na commented Apr 9, 2019

This is part of the code modernization effort. Trying to use promises in the whole code base. Migration to typescript can also later build on this. I'm doing the same for runBlock now. Let me know if you have any hesitations.

Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

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

Ok, I am getting it after comparing the code a bit more. 😄 Looks good, think it's ok to combine for the moment.

@s1na s1na merged commit 519a076 into v4 Apr 10, 2019
@s1na s1na deleted the refactor/runTx branch April 10, 2019 07:38
@s1na s1na mentioned this pull request Apr 10, 2019
23 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants