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

#1346: Add static factory methods for BlockProcessResult #1361

Merged
merged 4 commits into from
Nov 12, 2020

Conversation

andreoss
Copy link
Contributor

@andreoss andreoss commented Nov 12, 2020

Per #1346:
Add static factory methods for two types of BlockProcessResultTest and make ctor protected.

Motivation and Context

Refactoring.

How Has This Been Tested?

All unit tests pass

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • Tests for the changes have been added (for bug fixes / features)
  • Requires Activation Code (Hard Fork)

@sonarcloud
Copy link

sonarcloud bot commented Nov 12, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (1.8.0_272) you have used to run this analysis is deprecated and we will stop accepting it accepting it soon.Please update to at least Java 11.
Read more here

@andreoss andreoss marked this pull request as ready for review November 12, 2020 01:05
@andreoss andreoss changed the title #1346: Add static factory methods for BlockProcessResultTest #1346: Add static factory methods for BlockProcessResult Nov 12, 2020
@fedejinich
Copy link
Contributor

@andreoss nice! thanks for the contribution, I'll take a look on it

@fedejinich fedejinich self-requested a review November 12, 2020 14:21
Copy link
Contributor

@fedejinich fedejinich left a comment

Choose a reason for hiding this comment

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

approved 👍

@fedejinich
Copy link
Contributor

pipeline:run

@@ -39,18 +40,16 @@
*/
public class SimpleBlockProcessor implements BlockProcessor {
public long lastKnownBlockNumber = 0;
private List<Block> blocks = new ArrayList<Block>();
private final List<Block> blocks = new ArrayList<Block>();
private long requestId;
private byte[] hash;
private int count;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you could remove this field too, its never used.

@ajlopezrsk ajlopezrsk merged commit cf746cf into rsksmart:master Nov 12, 2020
@aeidelman aeidelman added this to the Iris 3.0.0 milestone Jul 7, 2021
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.

5 participants