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
0ee44e79
Commit
0ee44e79
authored
Sep 28, 2018
by
Anton Evangelatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swarm/storage: make linter happy
parent
d5837e84
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
epoch_test.go
swarm/storage/mru/lookup/epoch_test.go
+3
-3
lookup_test.go
swarm/storage/mru/lookup/lookup_test.go
+1
-3
query.go
swarm/storage/mru/query.go
+1
-1
No files found.
swarm/storage/mru/lookup/epoch_test.go
View file @
0ee44e79
...
...
@@ -42,15 +42,15 @@ func TestAfter(t *testing.T) {
Level
:
4
,
}
if
b
.
After
(
a
)
!=
true
{
if
!
b
.
After
(
a
)
{
t
.
Fatal
(
"Expected 'after' to be true, got false"
)
}
if
b
.
After
(
b
)
!=
false
{
if
b
.
After
(
b
)
{
t
.
Fatal
(
"Expected 'after' to be false when both epochs are identical, got true"
)
}
if
b
.
After
(
c
)
!=
true
{
if
!
b
.
After
(
c
)
{
t
.
Fatal
(
"Expected 'after' to be true when both epochs have the same time but the level is lower in the first one, but got false"
)
}
...
...
swarm/storage/mru/lookup/lookup_test.go
View file @
0ee44e79
...
...
@@ -38,9 +38,7 @@ func write(store Store, epoch lookup.Epoch, value *Data) {
}
func
update
(
store
Store
,
last
lookup
.
Epoch
,
now
uint64
,
value
*
Data
)
lookup
.
Epoch
{
var
epoch
lookup
.
Epoch
epoch
=
lookup
.
GetNextEpoch
(
last
,
now
)
epoch
:=
lookup
.
GetNextEpoch
(
last
,
now
)
write
(
store
,
epoch
,
value
)
...
...
swarm/storage/mru/query.go
View file @
0ee44e79
...
...
@@ -36,7 +36,7 @@ type Query struct {
// useful to parse query strings
func
(
q
*
Query
)
FromValues
(
values
Values
)
error
{
time
,
_
:=
strconv
.
ParseUint
(
values
.
Get
(
"time"
),
10
,
64
)
q
.
TimeLimit
=
uint64
(
time
)
q
.
TimeLimit
=
time
level
,
_
:=
strconv
.
ParseUint
(
values
.
Get
(
"hint.level"
),
10
,
32
)
q
.
Hint
.
Level
=
uint8
(
level
)
...
...
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