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
0255ed63
Commit
0255ed63
authored
May 02, 2017
by
Péter Szilágyi
Committed by
GitHub
May 02, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14403 from fjl/console-number
console: avoid float64 when remarshaling parameters
parents
5494e6e7
32db5716
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
bridge.go
console/bridge.go
+6
-3
No files found.
console/bridge.go
View file @
0255ed63
...
@@ -20,6 +20,7 @@ import (
...
@@ -20,6 +20,7 @@ import (
"encoding/json"
"encoding/json"
"fmt"
"fmt"
"io"
"io"
"strings"
"time"
"time"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/log"
...
@@ -240,17 +241,19 @@ func (b *bridge) Send(call otto.FunctionCall) (response otto.Value) {
...
@@ -240,17 +241,19 @@ func (b *bridge) Send(call otto.FunctionCall) (response otto.Value) {
throwJSException
(
err
.
Error
())
throwJSException
(
err
.
Error
())
}
}
var
(
var
(
rawReq
=
[]
byte
(
reqVal
.
String
())
rawReq
=
reqVal
.
String
()
dec
=
json
.
NewDecoder
(
strings
.
NewReader
(
rawReq
))
reqs
[]
jsonrpcCall
reqs
[]
jsonrpcCall
batch
bool
batch
bool
)
)
dec
.
UseNumber
()
// avoid float64s
if
rawReq
[
0
]
==
'['
{
if
rawReq
[
0
]
==
'['
{
batch
=
true
batch
=
true
json
.
Unmarshal
(
rawReq
,
&
reqs
)
dec
.
Decode
(
&
reqs
)
}
else
{
}
else
{
batch
=
false
batch
=
false
reqs
=
make
([]
jsonrpcCall
,
1
)
reqs
=
make
([]
jsonrpcCall
,
1
)
json
.
Unmarshal
(
rawReq
,
&
reqs
[
0
])
dec
.
Decode
(
&
reqs
[
0
])
}
}
// Execute the requests.
// Execute the requests.
...
...
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