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

Move node and application implementations to header file #804

Merged

Conversation

jmjatlanta
Copy link
Contributor

@jmjatlanta jmjatlanta commented Apr 2, 2018

The node and application implementations were embedded in their respective .cpp file. Under normal conditions, this is preferable in order to hide the actual implementation. But it makes testing very difficult.

Tests can now inherit from these implementations and twist them to their needs, with minimal changes to the class definition (i.e. mark a method virtual, change a member variable to protected instead of private) and hopefully no changes to the actual implementation within the .cpp file.

These commits change a large number of lines, but the actual logic changes are (hopefully) nil. Please carefully critique.

Also included is an adjustment to make the app_test tests pass, as well as share some code with the cli_test application (moved some common code to a header file).

Copy link
Member

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

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

thank you for making this John, looks good to me after done some testing.

@abitmore abitmore added this to the 201805 - Non-Consensus-Changing Release milestone Apr 6, 2018
@abitmore
Copy link
Member

abitmore commented Apr 8, 2018

@pmconrad can you please take a look?

Copy link
Contributor

@pmconrad pmconrad left a comment

Choose a reason for hiding this comment

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

Good job.

General advice @ALL for the future: please structure your commits in a way that makes it easier to follow the changes. For example,

  • use separate commits for whitespace-only changes
  • use separate commits when extracting large chunks of code into separate files
  • before pushing, use rebase -i to squash minor fixes into the broken commits

@oxarbitrage oxarbitrage merged commit 1a1a187 into bitshares:develop Apr 9, 2018
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