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
2f8601ef
Commit
2f8601ef
authored
Mar 23, 2015
by
Taylor Gerring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename blockAge to blockHeight
parent
3f6e1b2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
args.go
rpc/args.go
+7
-7
No files found.
rpc/args.go
View file @
2f8601ef
...
...
@@ -8,7 +8,7 @@ import (
"github.com/ethereum/go-ethereum/common"
)
func
block
Age
(
raw
interface
{},
number
*
int64
)
(
err
error
)
{
func
block
Height
(
raw
interface
{},
number
*
int64
)
(
err
error
)
{
// Parse as integer
num
,
ok
:=
raw
.
(
float64
)
if
ok
{
...
...
@@ -137,7 +137,7 @@ func (args *NewTxArgs) UnmarshalJSON(b []byte) (err error) {
return
NewDecodeParamError
(
err
.
Error
())
}
if
err
:=
block
Age
(
raw
,
&
args
.
BlockNumber
);
err
!=
nil
{
if
err
:=
block
Height
(
raw
,
&
args
.
BlockNumber
);
err
!=
nil
{
return
err
}
}
...
...
@@ -174,7 +174,7 @@ func (args *GetStorageArgs) UnmarshalJSON(b []byte) (err error) {
args
.
Address
=
addstr
if
len
(
obj
)
>
1
{
if
err
:=
block
Age
(
obj
[
1
],
&
args
.
BlockNumber
);
err
!=
nil
{
if
err
:=
block
Height
(
obj
[
1
],
&
args
.
BlockNumber
);
err
!=
nil
{
return
err
}
}
...
...
@@ -218,7 +218,7 @@ func (args *GetStorageAtArgs) UnmarshalJSON(b []byte) (err error) {
args
.
Key
=
keystr
if
len
(
obj
)
>
2
{
if
err
:=
block
Age
(
obj
[
2
],
&
args
.
BlockNumber
);
err
!=
nil
{
if
err
:=
block
Height
(
obj
[
2
],
&
args
.
BlockNumber
);
err
!=
nil
{
return
err
}
}
...
...
@@ -259,7 +259,7 @@ func (args *GetTxCountArgs) UnmarshalJSON(b []byte) (err error) {
args
.
Address
=
addstr
if
len
(
obj
)
>
1
{
if
err
:=
block
Age
(
obj
[
1
],
&
args
.
BlockNumber
);
err
!=
nil
{
if
err
:=
block
Height
(
obj
[
1
],
&
args
.
BlockNumber
);
err
!=
nil
{
return
err
}
}
...
...
@@ -296,7 +296,7 @@ func (args *GetBalanceArgs) UnmarshalJSON(b []byte) (err error) {
args
.
Address
=
addstr
if
len
(
obj
)
>
1
{
if
err
:=
block
Age
(
obj
[
1
],
&
args
.
BlockNumber
);
err
!=
nil
{
if
err
:=
block
Height
(
obj
[
1
],
&
args
.
BlockNumber
);
err
!=
nil
{
return
err
}
}
...
...
@@ -333,7 +333,7 @@ func (args *GetDataArgs) UnmarshalJSON(b []byte) (err error) {
args
.
Address
=
addstr
if
len
(
obj
)
>
1
{
if
err
:=
block
Age
(
obj
[
1
],
&
args
.
BlockNumber
);
err
!=
nil
{
if
err
:=
block
Height
(
obj
[
1
],
&
args
.
BlockNumber
);
err
!=
nil
{
return
err
}
}
...
...
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