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
4f7fc7b2
Commit
4f7fc7b2
authored
Jul 06, 2015
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpc, xeth: fixed returned tx hash & receipt logs
parent
457a3c8f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
parsing.go
rpc/api/parsing.go
+14
-9
xeth.go
xeth/xeth.go
+1
-1
No files found.
rpc/api/parsing.go
View file @
4f7fc7b2
...
...
@@ -404,14 +404,14 @@ func NewUncleRes(h *types.Header) *UncleRes {
// }
type
ReceiptRes
struct
{
TransactionHash
*
hexdata
`json:
transactionHash
`
TransactionIndex
*
hexnum
`json:
transactionIndex
`
BlockNumber
*
hexnum
`json:
blockNumber
`
BlockHash
*
hexdata
`json:
blockHash
`
CumulativeGasUsed
*
hexnum
`json:
cumulativeGasUsed
`
GasUsed
*
hexnum
`json:
gasUsed
`
ContractAddress
*
hexdata
`json:
contractAddress
`
Logs
*
[]
interface
{}
`json:
logs
`
TransactionHash
*
hexdata
`json:
"transactionHash"
`
TransactionIndex
*
hexnum
`json:
"transactionIndex"
`
BlockNumber
*
hexnum
`json:
"blockNumber"
`
BlockHash
*
hexdata
`json:
"blockHash"
`
CumulativeGasUsed
*
hexnum
`json:
"cumulativeGasUsed"
`
GasUsed
*
hexnum
`json:
"gasUsed"
`
ContractAddress
*
hexdata
`json:
"contractAddress"
`
Logs
*
[]
interface
{}
`json:
"logs"
`
}
func
NewReceiptRes
(
rec
*
types
.
Receipt
)
*
ReceiptRes
{
...
...
@@ -430,7 +430,12 @@ func NewReceiptRes(rec *types.Receipt) *ReceiptRes {
if
bytes
.
Compare
(
rec
.
ContractAddress
.
Bytes
(),
bytes
.
Repeat
([]
byte
{
0
},
20
))
!=
0
{
v
.
ContractAddress
=
newHexData
(
rec
.
ContractAddress
)
}
// v.Logs = rec.Logs()
logs
:=
make
([]
interface
{},
len
(
rec
.
Logs
()))
for
i
,
log
:=
range
rec
.
Logs
()
{
logs
[
i
]
=
NewLogRes
(
log
)
}
v
.
Logs
=
&
logs
return
v
}
...
...
xeth/xeth.go
View file @
4f7fc7b2
...
...
@@ -973,7 +973,7 @@ func (self *XEth) Transact(fromStr, toStr, nonceStr, valueStr, gasStr, gasPriceS
glog
.
V
(
logger
.
Info
)
.
Infof
(
"Tx(%x) to: %x
\n
"
,
tx
.
Hash
(),
tx
.
To
())
}
return
tx
.
Hash
()
.
Hex
(),
nil
return
signed
.
Hash
()
.
Hex
(),
nil
}
func
(
self
*
XEth
)
sign
(
tx
*
types
.
Transaction
,
from
common
.
Address
,
didUnlock
bool
)
(
*
types
.
Transaction
,
error
)
{
...
...
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