ethclient: simplify TransactionInclusionBlock

This commit is contained in:
Felix Lange 2018-10-16 00:54:47 +02:00 committed by GitHub
parent ffbb9033ae
commit 91f6f53127
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -202,15 +202,8 @@ func (ec *Client) TransactionInclusionBlock(ctx context.Context, hash common.Has
return 0, err
} else if json == nil {
return 0, ethereum.NotFound
} else if _, r, _ := json.tx.RawSignatureValues(); r == nil {
return 0, fmt.Errorf("server returned transaction without signature")
}
setSenderFromServer(json.tx, json.From, json.BlockHash)
blockNumber, err = strconv.ParseUint(*json.BlockNumber, 0, 64)
if err != nil {
return 0, err
}
return blockNumber, nil
return strconv.ParseUint(*json.BlockNumber, 0, 64)
}
// TransactionSender returns the sender address of the given transaction. The transaction