mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Update ethclient.go
This commit is contained in:
parent
9c772165f7
commit
0924ae5d36
1 changed files with 3 additions and 5 deletions
|
|
@ -306,13 +306,11 @@ func (ec *Client) TransactionInBlock(ctx context.Context, blockHash common.Hash,
|
||||||
// Note that the receipt is not available for pending transactions.
|
// Note that the receipt is not available for pending transactions.
|
||||||
func (ec *Client) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) {
|
func (ec *Client) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) {
|
||||||
var r *types.Receipt
|
var r *types.Receipt
|
||||||
if err := ec.c.CallContext(ctx, &r, "eth_getTransactionReceipt", txHash); err != nil {
|
err := ec.c.CallContext(ctx, &r, "eth_getTransactionReceipt", txHash)
|
||||||
return nil, err
|
if err == nil && r == nil {
|
||||||
}
|
|
||||||
if r == nil {
|
|
||||||
return nil, ethereum.NotFound
|
return nil, ethereum.NotFound
|
||||||
}
|
}
|
||||||
return r, nil
|
return r, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// SyncProgress retrieves the current progress of the sync algorithm. If there's
|
// SyncProgress retrieves the current progress of the sync algorithm. If there's
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue