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
c283d9b5
Commit
c283d9b5
authored
Feb 19, 2019
by
Hsien-Tang Kao
Committed by
Péter Szilágyi
Feb 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
signer/core: handle JSON unmarshal error (#19123)
parent
4a090a1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
abihelper.go
signer/core/abihelper.go
+9
-3
No files found.
signer/core/abihelper.go
View file @
c283d9b5
...
...
@@ -177,7 +177,9 @@ func NewAbiDBFromFile(path string) (*AbiDb, error) {
if
err
!=
nil
{
return
nil
,
err
}
json
.
Unmarshal
(
raw
,
&
db
.
db
)
if
err
:=
json
.
Unmarshal
(
raw
,
&
db
.
db
);
err
!=
nil
{
return
nil
,
err
}
return
db
,
nil
}
...
...
@@ -192,14 +194,18 @@ func NewAbiDBFromFiles(standard, custom string) (*AbiDb, error) {
if
err
!=
nil
{
return
nil
,
err
}
json
.
Unmarshal
(
raw
,
&
db
.
db
)
if
err
:=
json
.
Unmarshal
(
raw
,
&
db
.
db
);
err
!=
nil
{
return
nil
,
err
}
// Custom file may not exist. Will be created during save, if needed
if
_
,
err
:=
os
.
Stat
(
custom
);
err
==
nil
{
raw
,
err
=
ioutil
.
ReadFile
(
custom
)
if
err
!=
nil
{
return
nil
,
err
}
json
.
Unmarshal
(
raw
,
&
db
.
customdb
)
if
err
:=
json
.
Unmarshal
(
raw
,
&
db
.
customdb
);
err
!=
nil
{
return
nil
,
err
}
}
return
db
,
nil
...
...
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