mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-04-25 02:52:23 +00:00
Fix RLP decoding of tx metadata
This commit is contained in:
parent
537e2cfeb6
commit
9bdf0b655d
1 changed files with 4 additions and 2 deletions
|
|
@ -196,7 +196,7 @@ func (self *XEth) EthTransactionByHash(hash string) (tx *types.Transaction, blha
|
||||||
// meta
|
// meta
|
||||||
var txExtra struct {
|
var txExtra struct {
|
||||||
BlockHash common.Hash
|
BlockHash common.Hash
|
||||||
BlockIndex int64
|
BlockIndex uint64
|
||||||
Index uint64
|
Index uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -205,8 +205,10 @@ func (self *XEth) EthTransactionByHash(hash string) (tx *types.Transaction, blha
|
||||||
err := rlp.Decode(r, &txExtra)
|
err := rlp.Decode(r, &txExtra)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
blhash = txExtra.BlockHash
|
blhash = txExtra.BlockHash
|
||||||
blnum = big.NewInt(txExtra.BlockIndex)
|
blnum = big.NewInt(int64(txExtra.BlockIndex))
|
||||||
txi = txExtra.Index
|
txi = txExtra.Index
|
||||||
|
} else {
|
||||||
|
pipelogger.Errorln(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue