From 339aa421264acc2f9cf66caebe8eb74f5637c610 Mon Sep 17 00:00:00 2001 From: CocoaHuke Date: Thu, 21 Jun 2018 15:05:56 -0700 Subject: [PATCH] Add GetTransactionStatus to Public API --- internal/ethapi/api.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index a465a59046..55edc5c272 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1090,6 +1090,11 @@ func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, ha return fields, nil } +// GetTransactionStatus returns current status of the transaction given hash +func (s *PublicTransactionPoolAPI) GetTransactionStatus(ctx context.Context, hash common.Hash) (core.TxStatus, error) { + return s.b.TxStatusByHash(ctx, hash) +} + // sign is a helper function that signs a transaction with the private key of the given address. func (s *PublicTransactionPoolAPI) sign(addr common.Address, tx *types.Transaction) (*types.Transaction, error) { // Look up the wallet containing the requested signer