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

Remove code duplication from test_blockchain_json #592

Closed
jangko opened this issue Apr 23, 2021 · 0 comments
Closed

Remove code duplication from test_blockchain_json #592

jangko opened this issue Apr 23, 2021 · 0 comments

Comments

@jangko
Copy link
Contributor

jangko commented Apr 23, 2021

current situation:

test_blockchain_json.nim have it's own code for block validation, and nimbus has it's own code for block validation. The reason is, in the past nimbus block validation is a mess, so test_blockchain_json was developed in parallel as a debugging tool too and some of the code is ported back to nimbus or code from nimbus copied to test_blockchain_json.

why it is bad:

  • if you change/fix code in one place and forget to change/fix the other place, weird error will greet you.
  • test_block_chain is meant to be a test tool, but it is very complicated and bloated.
  • as shown by graphql test suite, the same test data from EF test suite can use nimbus block validation. The resulting test code is much leaner and simpler to understand.
jangko added a commit that referenced this issue May 14, 2021
now test_blockchain_json is using block validation code
from p2p/executor.nim instead of using it's own
block validation code.

this will reduce maintenance cost and fixes #592.
@jangko jangko closed this as completed in 2a9c398 May 14, 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

No branches or pull requests

1 participant