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
Events API: Transaction dropped, sync status, and renames #1919
Merged
+281
−127
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
602ea15
move new event types over from api repo
RatanRSur e1d9900
add LogWithMetadata to API
RatanRSur 3fdfa6c
type and naming changes to api
RatanRSur b6df067
sync related changes
RatanRSur d23607c
cosmetic
RatanRSur 5f87036
change from Object to Long in test
RatanRSur 2dff648
remove test conditions from Object listeners
RatanRSur 2ca5f37
implement listener directly on sync state + tests
RatanRSur ff88a71
flatMap
RatanRSur 095106e
fix typo
RatanRSur a8e6ce1
change logs api
RatanRSur b71bbb8
remove optional import
RatanRSur b55406e
spotless
RatanRSur 2f7edd6
rename Sync related stuff and remove logs for now
RatanRSur 1d37305
add transaction dropped testing
RatanRSur e85d86d
add isNotNull checks
RatanRSur b1612ce
rename
RatanRSur 96f26fc
spotless
RatanRSur 3feaf70
Revert "flatMap"
RatanRSur 72a7ba7
remove log related stuff
RatanRSur 7a27061
revert LogWithMetadata change
RatanRSur d890325
fix test compile errors
RatanRSur fbcddb3
Merge branch 'master' into event-stream-api
RatanRSur 3a4b27d
Merge branch 'master' into event-stream-api
RatanRSur 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
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
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
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 |
---|---|---|
|
@@ -16,10 +16,10 @@ | |
import static org.mockito.Mockito.mock; | ||
import static org.mockito.Mockito.when; | ||
|
||
import tech.pegasys.pantheon.ethereum.core.SyncStatus; | ||
import tech.pegasys.pantheon.ethereum.core.Synchronizer; | ||
import tech.pegasys.pantheon.ethereum.jsonrpc.health.HealthService.ParamSource; | ||
import tech.pegasys.pantheon.ethereum.p2p.network.P2PNetwork; | ||
import tech.pegasys.pantheon.plugin.data.SyncStatus; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
@@ -141,6 +141,7 @@ public void shouldNotBeReadyWhenCustomMaxBlocksBehindIsInvalid() { | |
} | ||
|
||
private Optional<SyncStatus> createSyncStatus(final int currentBlock, final int highestBlock) { | ||
return Optional.of(new SyncStatus(0, currentBlock, highestBlock)); | ||
return Optional.of( | ||
new tech.pegasys.pantheon.ethereum.core.SyncStatus(0, currentBlock, highestBlock)); | ||
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. If only java had type aliases on import... |
||
} | ||
} |
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.
(discussion) : why
@VisibleForTesting
if public ?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.
I didn't know this before but
@VisibleForTesting
is for documentation purposes only! I used to think it actually changed the visibility for the tests in some special way. It's to communicate that if not for the tests, this method would be less visible.