-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dee11fc
commit 4b27f75
Showing
28 changed files
with
508 additions
and
144 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package mocks | ||
|
||
import "time" | ||
|
||
type NodeConfig struct { | ||
PollFailureThresholdVal uint32 | ||
PollIntervalVal time.Duration | ||
SelectionModeVal string | ||
SyncThresholdVal uint32 | ||
NodeIsSyncingEnabledVal bool | ||
FinalizedBlockPollIntervalVal time.Duration | ||
} | ||
|
||
func (n NodeConfig) PollFailureThreshold() uint32 { | ||
return n.PollFailureThresholdVal | ||
} | ||
|
||
func (n NodeConfig) PollInterval() time.Duration { | ||
return n.PollIntervalVal | ||
} | ||
|
||
func (n NodeConfig) SelectionMode() string { | ||
return n.SelectionModeVal | ||
} | ||
|
||
func (n NodeConfig) SyncThreshold() uint32 { | ||
return n.SyncThresholdVal | ||
} | ||
|
||
func (n NodeConfig) NodeIsSyncingEnabled() bool { | ||
return n.NodeIsSyncingEnabledVal | ||
} | ||
|
||
func (n NodeConfig) FinalizedBlockPollInterval() time.Duration { | ||
return n.FinalizedBlockPollIntervalVal | ||
} | ||
|
||
type ChainConfig struct { | ||
IsFinalityTagEnabled bool | ||
FinalityDepthVal uint32 | ||
NoNewHeadsThresholdVal time.Duration | ||
} | ||
|
||
func (t ChainConfig) NodeNoNewHeadsThreshold() time.Duration { | ||
return t.NoNewHeadsThresholdVal | ||
} | ||
|
||
func (t ChainConfig) FinalityDepth() uint32 { | ||
return t.FinalityDepthVal | ||
} | ||
|
||
func (t ChainConfig) FinalityTagEnabled() bool { | ||
return t.IsFinalityTagEnabled | ||
} |
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.