mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Fixing the Simulated and Adding a new Fn TransactionByHashWithBlockNum
This commit is contained in:
parent
020746bcba
commit
3575e99e2f
1 changed files with 3 additions and 3 deletions
|
|
@ -194,11 +194,11 @@ func (ec *Client) TransactionByHashWithBlockNum(ctx context.Context, hash common
|
||||||
var json *rpcTransaction
|
var json *rpcTransaction
|
||||||
err = ec.c.CallContext(ctx, &json, "eth_getTransactionByHash", hash)
|
err = ec.c.CallContext(ctx, &json, "eth_getTransactionByHash", hash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, false, err
|
return nil, "0", err
|
||||||
} else if json == nil {
|
} else if json == nil {
|
||||||
return nil, false, ethereum.NotFound
|
return nil, "0", ethereum.NotFound
|
||||||
} else if _, r, _ := json.tx.RawSignatureValues(); r == nil {
|
} else if _, r, _ := json.tx.RawSignatureValues(); r == nil {
|
||||||
return nil, false, fmt.Errorf("server returned transaction without signature")
|
return nil, "0", fmt.Errorf("server returned transaction without signature")
|
||||||
}
|
}
|
||||||
if json.From != nil && json.BlockHash != nil {
|
if json.From != nil && json.BlockHash != nil {
|
||||||
setSenderFromServer(json.tx, *json.From, *json.BlockHash)
|
setSenderFromServer(json.tx, *json.From, *json.BlockHash)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue