Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
whqwjb
go-ethereum
提交
7910dd51
G
go-ethereum
项目概览
whqwjb
/
go-ethereum
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
go-ethereum
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
7910dd51
编写于
9月 28, 2018
作者:
V
Viktor Trón
提交者:
GitHub
9月 28, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #17781 from ethersphere/trim_newline
cmd/swarm: trim new lines from files
上级
dcaabfe7
0ee44e79
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
7 addition
and
9 deletion
+7
-9
cmd/swarm/access.go
cmd/swarm/access.go
+2
-2
swarm/storage/mru/lookup/epoch_test.go
swarm/storage/mru/lookup/epoch_test.go
+3
-3
swarm/storage/mru/lookup/lookup_test.go
swarm/storage/mru/lookup/lookup_test.go
+1
-3
swarm/storage/mru/query.go
swarm/storage/mru/query.go
+1
-1
未找到文件。
cmd/swarm/access.go
浏览文件 @
7910dd51
...
...
@@ -130,7 +130,7 @@ func accessNewACT(ctx *cli.Context) {
if
err
!=
nil
{
utils
.
Fatalf
(
"had an error reading the grantee public key list"
)
}
pkGrantees
=
strings
.
Split
(
string
(
bytes
),
"
\n
"
)
pkGrantees
=
strings
.
Split
(
string
s
.
Trim
(
string
(
bytes
),
"
\n
"
),
"
\n
"
)
}
if
passGranteesFilename
!=
""
{
...
...
@@ -138,7 +138,7 @@ func accessNewACT(ctx *cli.Context) {
if
err
!=
nil
{
utils
.
Fatalf
(
"could not read password filename: %v"
,
err
)
}
passGrantees
=
strings
.
Split
(
string
(
bytes
),
"
\n
"
)
passGrantees
=
strings
.
Split
(
string
s
.
Trim
(
string
(
bytes
),
"
\n
"
),
"
\n
"
)
}
accessKey
,
ae
,
actManifest
,
err
=
api
.
DoACT
(
ctx
,
privateKey
,
salt
,
pkGrantees
,
passGrantees
)
if
err
!=
nil
{
...
...
swarm/storage/mru/lookup/epoch_test.go
浏览文件 @
7910dd51
...
...
@@ -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
浏览文件 @
7910dd51
...
...
@@ -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
浏览文件 @
7910dd51
...
...
@@ -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
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录