aboutsummaryrefslogtreecommitdiffstats
path: root/node
diff options
context:
space:
mode:
authorBas van Kervel <basvankervel@gmail.com>2016-11-29 00:14:55 +0800
committerBas van Kervel <basvankervel@gmail.com>2016-11-29 16:36:51 +0800
commit1fc5cc1b598ef52f8f95ce47697dcc6993ac480d (patch)
tree515f592774319a568966c04779d129333b7c37fd /node
parentbf24b120d7ab952282c5c12c36d249626b1293ea (diff)
downloadgo-tangerine-1fc5cc1b598ef52f8f95ce47697dcc6993ac480d.tar
go-tangerine-1fc5cc1b598ef52f8f95ce47697dcc6993ac480d.tar.gz
go-tangerine-1fc5cc1b598ef52f8f95ce47697dcc6993ac480d.tar.bz2
go-tangerine-1fc5cc1b598ef52f8f95ce47697dcc6993ac480d.tar.lz
go-tangerine-1fc5cc1b598ef52f8f95ce47697dcc6993ac480d.tar.xz
go-tangerine-1fc5cc1b598ef52f8f95ce47697dcc6993ac480d.tar.zst
go-tangerine-1fc5cc1b598ef52f8f95ce47697dcc6993ac480d.zip
node: improve error handling for web3_sha3 RPC method
Diffstat (limited to 'node')
-rw-r--r--node/api.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/node/api.go b/node/api.go
index 631e92c8e..7c9ad601a 100644
--- a/node/api.go
+++ b/node/api.go
@@ -21,7 +21,7 @@ import (
"strings"
"time"
- "github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/p2p/discover"
@@ -331,6 +331,6 @@ func (s *PublicWeb3API) ClientVersion() string {
// Sha3 applies the ethereum sha3 implementation on the input.
// It assumes the input is hex encoded.
-func (s *PublicWeb3API) Sha3(input string) string {
- return common.ToHex(crypto.Keccak256(common.FromHex(input)))
+func (s *PublicWeb3API) Sha3(input hexutil.Bytes) hexutil.Bytes {
+ return crypto.Keccak256(input)
}