From b10805b317e9b563439a5c0e2e0f76b98560f5f2 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 25 Sep 2017 10:13:23 +0200 Subject: [PATCH] internal/ethapi: fix review comment --- internal/ethapi/api.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 1937040b2a..605372b523 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1132,15 +1132,12 @@ func (s *PublicTransactionPoolAPI) SendTransaction(ctx context.Context, args Sen // SendRawTransaction will add the signed transaction to the transaction pool. // The sender is responsible for signing the transaction and using the correct nonce. -func (s *PublicTransactionPoolAPI) SendRawTransaction(ctx context.Context, encodedTx hexutil.Bytes) (string, error) { +func (s *PublicTransactionPoolAPI) SendRawTransaction(ctx context.Context, encodedTx hexutil.Bytes) (common.Hash, error) { tx := new(types.Transaction) if err := rlp.DecodeBytes(encodedTx, tx); err != nil { - return "", err + return common.Hash{}, err } - - txHash, err := submitTransaction(ctx, s.b, tx) - return txHash.Hex(), err - + return submitTransaction(ctx, s.b, tx) } // Sign calculates an ECDSA signature for: