This repository has been archived by the owner on Sep 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
Remove EthTaskChainDownloader and supporting code #1373
Merged
ajsutton
merged 9 commits into
PegaSysEng:master
from
ajsutton:remove-eth-task-downloader
May 1, 2019
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
242e665
Remove fast sync eth chain downloader code.
ajsutton f8e523e
Remove EthTaskChainDownloader and supporting code.
ajsutton 1029c63
Merge branch 'master' of github.com:PegaSysEng/pantheon into remove-e…
ajsutton db0f029
Fix equals and hashcode for EthereumWireProtocolConfiguration.
ajsutton 1bc0ef9
Fix toString for EthereumWireProtocolConfiguration.
ajsutton 0ad3ce4
Spotless.
ajsutton ac7b49c
Merge branch 'master' of github.com:PegaSysEng/pantheon into remove-e…
ajsutton 4b8487c
Merge branch 'master' into remove-eth-task-downloader
ajsutton c3dbb74
Merge branch 'master' into remove-eth-task-downloader
ajsutton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
63 changes: 0 additions & 63 deletions
63
ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/core/BlockMetadata.java
This file was deleted.
Oops, something went wrong.
118 changes: 0 additions & 118 deletions
118
ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/core/TransactionBuilder.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,9 @@ | |
|
||
import tech.pegasys.pantheon.util.number.PositiveNumber; | ||
|
||
import java.util.Objects; | ||
|
||
import com.google.common.base.MoreObjects; | ||
import picocli.CommandLine; | ||
|
||
public class EthereumWireProtocolConfiguration { | ||
|
@@ -68,27 +71,33 @@ public int getMaxGetNodeData() { | |
} | ||
|
||
@Override | ||
public boolean equals(final Object obj) { | ||
if (!(obj instanceof EthereumWireProtocolConfiguration)) { | ||
public boolean equals(final Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
EthereumWireProtocolConfiguration other = ((EthereumWireProtocolConfiguration) obj); | ||
return maxGetBlockHeaders == other.maxGetBlockHeaders | ||
&& maxGetBlockBodies == other.maxGetBlockBodies | ||
&& maxGetReceipts == other.maxGetReceipts | ||
&& maxGetNodeData == other.maxGetNodeData; | ||
final EthereumWireProtocolConfiguration that = (EthereumWireProtocolConfiguration) o; | ||
return maxGetBlockHeaders == that.maxGetBlockHeaders | ||
&& maxGetBlockBodies == that.maxGetBlockBodies | ||
&& maxGetReceipts == that.maxGetReceipts | ||
&& maxGetNodeData == that.maxGetNodeData; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return super.hashCode(); | ||
return Objects.hash(maxGetBlockHeaders, maxGetBlockBodies, maxGetReceipts, maxGetNodeData); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return String.format( | ||
"maxGetBlockHeaders=%s\tmaxGetBlockBodies=%s\tmaxGetReceipts=%s\tmaxGetReceipts=%s", | ||
maxGetBlockHeaders, maxGetBlockBodies, maxGetReceipts, maxGetNodeData); | ||
return MoreObjects.toStringHelper(this) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Optional. Unit test. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. toString is always just for debugging purposes so the only time we should test it is when there's sensitive info that definitely shouldn't appear in a log (ie anything containing a password). |
||
.add("maxGetBlockHeaders", maxGetBlockHeaders) | ||
.add("maxGetBlockBodies", maxGetBlockBodies) | ||
.add("maxGetReceipts", maxGetReceipts) | ||
.add("maxGetNodeData", maxGetNodeData) | ||
.toString(); | ||
} | ||
|
||
public static class Builder { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional. Maybe we could test equals and hashCode. Although it is non blocking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Equals is only used by tests and hash code isn't used (but should exist to match equals just for good measure). I really only updated them to match our code style which is the generated code.