This website works better with JavaScript.
Home
Help
Sign In
zolfa
/
tendermint
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
221
Wiki
Activity
Browse Source
RawMessage fix
pull/456/head
Ethan Buchman
9 years ago
parent
91c734d02e
commit
14735d5eb5
1 changed files
with
6 additions
and
2 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+6
-2
types/types.go
+ 6
- 2
types/types.go
View File
@ -49,11 +49,15 @@ type RPCResponse struct {
}
}
func
NewRPCResponse
(
id
string
,
res
interface
{
}
,
err
string
)
RPCResponse
{
func
NewRPCResponse
(
id
string
,
res
interface
{
}
,
err
string
)
RPCResponse
{
raw
:=
json
.
RawMessage
(
wire
.
JSONBytes
(
res
)
)
var
raw
*
json
.
RawMessage
if
res
!=
nil
{
rawMsg
:=
json
.
RawMessage
(
wire
.
JSONBytes
(
res
)
)
raw
=
&
rawMsg
}
return
RPCResponse
{
return
RPCResponse
{
JSONRPC
:
"2.0"
,
JSONRPC
:
"2.0"
,
ID
:
id
,
ID
:
id
,
Result
:
&
raw
,
Result
:
raw
,
Error
:
err
,
Error
:
err
,
}
}
}
}
Write
Preview
Loading…
Cancel
Save