Fixing the Simulated and Adding a new Fn TransactionByHashWithBlockNum

This commit is contained in:
Priyadarshan Vyas 2019-05-28 18:01:13 -04:00
parent 020746bcba
commit 3575e99e2f

View file

@ -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)