Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
459278cd
Unverified
Commit
459278cd
authored
Oct 08, 2018
by
Felix Lange
Committed by
GitHub
Oct 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
miner: remove intermediate conversion to int in tests (#17853)
This fixes the tests on 32bit platforms.
parent
cfcc4752
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
worker_test.go
miner/worker_test.go
+2
-2
No files found.
miner/worker_test.go
View file @
459278cd
...
...
@@ -390,12 +390,12 @@ func testAdjustInterval(t *testing.T, chainConfig *params.ChainConfig, engine co
case
1
:
origin
:=
float64
(
3
*
time
.
Second
.
Nanoseconds
())
estimate
:=
origin
*
(
1
-
intervalAdjustRatio
)
+
intervalAdjustRatio
*
(
origin
/
0.8
+
intervalAdjustBias
)
wantMinInterval
,
wantRecommitInterval
=
3
*
time
.
Second
,
time
.
Duration
(
int
(
estimate
)
)
*
time
.
Nanosecond
wantMinInterval
,
wantRecommitInterval
=
3
*
time
.
Second
,
time
.
Duration
(
estimate
)
*
time
.
Nanosecond
case
2
:
estimate
:=
result
[
index
-
1
]
min
:=
float64
(
3
*
time
.
Second
.
Nanoseconds
())
estimate
=
estimate
*
(
1
-
intervalAdjustRatio
)
+
intervalAdjustRatio
*
(
min
-
intervalAdjustBias
)
wantMinInterval
,
wantRecommitInterval
=
3
*
time
.
Second
,
time
.
Duration
(
int
(
estimate
)
)
*
time
.
Nanosecond
wantMinInterval
,
wantRecommitInterval
=
3
*
time
.
Second
,
time
.
Duration
(
estimate
)
*
time
.
Nanosecond
case
3
:
wantMinInterval
,
wantRecommitInterval
=
time
.
Second
,
time
.
Second
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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