Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Open sidebar
Tiger Ton
osmosis
Commits
6342691d
Unverified
Commit
6342691d
authored
2 years ago
by
Adam Tucker
Committed by
GitHub
2 years ago
Browse files
Options
Download
Email Patches
Plain Diff
gauge patch (#2797)
parent
0378e542
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
x/incentives/types/gauge.go
+2
-2
x/incentives/types/gauge.go
with
2 additions
and
2 deletions
+2
-2
x/incentives/types/gauge.go
+
2
-
2
View file @
6342691d
...
...
@@ -31,12 +31,12 @@ func NewGauge(id uint64, isPerpetual bool, distrTo lockuptypes.QueryCondition, c
// IsUpcomingGauge returns true if the gauge's distribution start time is after the provided time.
func
(
gauge
Gauge
)
IsUpcomingGauge
(
curTime
time
.
Time
)
bool
{
return
curTime
.
Before
(
gauge
.
StartTime
)
||
curTime
.
Equal
(
gauge
.
StartTime
)
return
curTime
.
Before
(
gauge
.
StartTime
)
}
// IsActiveGauge returns true if the gauge is in an active state during the provided time.
func
(
gauge
Gauge
)
IsActiveGauge
(
curTime
time
.
Time
)
bool
{
if
curTime
.
After
(
gauge
.
StartTime
)
&&
(
gauge
.
IsPerpetual
||
gauge
.
FilledEpochs
<
gauge
.
NumEpochsPaidOver
)
{
if
curTime
.
After
(
gauge
.
StartTime
)
||
curTime
.
Equal
(
gauge
.
StartTime
)
&&
(
gauge
.
IsPerpetual
||
gauge
.
FilledEpochs
<
gauge
.
NumEpochsPaidOver
)
{
return
true
}
return
false
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets