-
Notifications
You must be signed in to change notification settings - Fork 570
refactor(network): upgrade spn
#2816
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
be5ef75
update go mod
lumtis 03c1e32
clock package
lumtis 07d5c41
refactor network
lumtis 5b57620
new cmd
lumtis 4333fd9
last changes
lumtis da1cb00
typoe
lumtis d7e393d
import
lumtis 34c6071
fix unit test
lumtis eef0818
fix test 2
lumtis 29ab746
Merge branch 'develop' into network/launch-time
lumtis 0f63fd0
Merge branch 'develop' into network/launch-time
a707227
Upgrade for send request
lumtis a6f9882
Merge branch 'network/launch-time' of https://github.com/ignite/cli i…
lumtis 16b2f77
publish: add balance
lumtis 998c210
new logic for adding accounts
lumtis 1637f71
format
lumtis a9a1c63
change switch
lumtis c9a4572
changelog
lumtis aff8c4c
conflict
lumtis bc56af7
Merge branch 'develop' into network/launch-time
lumtis 996b3ba
Update ignite/cmd/network_chain_join.go
lumtis 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| package xtime | ||
|
|
||
| import "time" | ||
|
|
||
| // Clock represents a clock that can retrieve current time | ||
| type Clock interface { | ||
| Now() time.Time | ||
| Add(duration time.Duration) | ||
| } | ||
|
|
||
| // ClockSystem is a clock that retrieves system time | ||
| type ClockSystem struct{} | ||
|
|
||
| // NewClockSystem returns a new ClockSystem | ||
| func NewClockSystem() ClockSystem { | ||
| return ClockSystem{} | ||
| } | ||
|
|
||
| // Now implements Clock | ||
| func (ClockSystem) Now() time.Time { | ||
| return time.Now() | ||
| } | ||
|
|
||
| // Add implements Clock | ||
| func (ClockSystem) Add(_ time.Duration) { | ||
| panic("Add can't be called for ClockSystem") | ||
| } | ||
|
|
||
| // ClockMock is a clock mocking time with an internal counter | ||
| type ClockMock struct { | ||
| t time.Time | ||
| } | ||
|
|
||
| // NewClockMock returns a new ClockMock | ||
| func NewClockMock(originalTime time.Time) *ClockMock { | ||
| return &ClockMock{ | ||
| t: originalTime, | ||
| } | ||
| } | ||
|
|
||
| // Now implements Clock | ||
| func (c ClockMock) Now() time.Time { | ||
| return c.t | ||
| } | ||
|
|
||
| // Add implements Clock | ||
| func (c *ClockMock) Add(duration time.Duration) { | ||
| c.t = c.t.Add(duration) | ||
| } | ||
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.
Uh oh!
There was an error while loading. Please reload this page.