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
6d596b1a
Commit
6d596b1a
authored
Jun 22, 2015
by
Bas van Kervel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed eth sign unittest
parent
2e0b56a7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
9 deletions
+27
-9
eth.go
rpc/api/eth.go
+2
-2
eth_args.go
rpc/api/eth_args.go
+6
-6
eth_js.go
rpc/api/eth_js.go
+17
-0
utils.go
rpc/api/utils.go
+2
-0
utils.go
rpc/shared/utils.go
+0
-1
No files found.
rpc/api/eth.go
View file @
6d596b1a
...
...
@@ -46,7 +46,7 @@ var (
"eth_getData"
:
(
*
ethApi
)
.
GetData
,
"eth_getCode"
:
(
*
ethApi
)
.
GetData
,
"eth_sign"
:
(
*
ethApi
)
.
Sign
,
"eth_sendRawTransaction"
:
(
*
ethApi
)
.
PushTx
,
"eth_sendRawTransaction"
:
(
*
ethApi
)
.
SendRawTransaction
,
"eth_sendTransaction"
:
(
*
ethApi
)
.
SendTransaction
,
"eth_transact"
:
(
*
ethApi
)
.
SendTransaction
,
"eth_estimateGas"
:
(
*
ethApi
)
.
EstimateGas
,
...
...
@@ -250,7 +250,7 @@ func (self *ethApi) Sign(req *shared.Request) (interface{}, error) {
return
v
,
nil
}
func
(
self
*
ethApi
)
PushTx
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
func
(
self
*
ethApi
)
SendRawTransaction
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
args
:=
new
(
NewDataArgs
)
if
err
:=
self
.
codec
.
Decode
(
req
.
Params
,
&
args
);
err
!=
nil
{
return
nil
,
shared
.
NewDecodeParamError
(
err
.
Error
())
...
...
rpc/api/eth_args.go
View file @
6d596b1a
...
...
@@ -466,21 +466,21 @@ func (args *CallArgs) UnmarshalJSON(b []byte) (err error) {
}
args
.
Value
=
num
if
ext
.
Gas
==
nil
{
num
=
big
.
NewInt
(
0
)
}
else
{
if
ext
.
Gas
!=
nil
{
if
num
,
err
=
numString
(
ext
.
Gas
);
err
!=
nil
{
return
err
}
}
else
{
num
=
nil
}
args
.
Gas
=
num
if
ext
.
GasPrice
==
nil
{
num
=
big
.
NewInt
(
0
)
}
else
{
if
ext
.
GasPrice
!=
nil
{
if
num
,
err
=
numString
(
ext
.
GasPrice
);
err
!=
nil
{
return
err
}
}
else
{
num
=
nil
}
args
.
GasPrice
=
num
...
...
rpc/api/eth_js.go
View file @
6d596b1a
package
api
// JS api provided by web3.js
// eth_sign not standard
const
Eth_JS
=
`
web3._extend({
property: 'eth',
methods:
[
new web3._extend.Method({
name: 'sign',
call: 'eth_sign',
params: 2,
inputFormatter: [web3._extend.formatters.formatInputString,web3._extend.formatters.formatInputString],
outputFormatter: web3._extend.formatters.formatOutputString
})
]
});
`
rpc/api/utils.go
View file @
6d596b1a
...
...
@@ -178,6 +178,8 @@ func Javascript(name string) string {
return
Debug_JS
case
shared
.
DbApiName
:
return
Db_JS
case
shared
.
EthApiName
:
return
Eth_JS
case
shared
.
MinerApiName
:
return
Miner_JS
case
shared
.
NetApiName
:
...
...
rpc/shared/utils.go
View file @
6d596b1a
...
...
@@ -25,4 +25,3 @@ var (
ShhApiName
,
TxPoolApiName
,
PersonalApiName
,
Web3ApiName
,
},
","
)
)
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