From 97fb08342d227bbd126516083b0ddaf74e6e8468 Mon Sep 17 00:00:00 2001 From: Simon Jentzsch Date: Thu, 18 Oct 2018 21:41:22 +0200 Subject: EIP-1186 eth_getProof (#17737) * first impl of eth_getProof * fixed docu * added comments and refactored based on comments from holiman * created structs * handle errors correctly * change Value to *hexutil.Big in order to have the same output as parity * use ProofList as return type --- common/bytes.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'common') diff --git a/common/bytes.go b/common/bytes.go index 0c257a1ee..c82e61624 100644 --- a/common/bytes.go +++ b/common/bytes.go @@ -31,6 +31,15 @@ func ToHex(b []byte) string { return "0x" + hex } +// ToHexArray creates a array of hex-string based on []byte +func ToHexArray(b [][]byte) []string { + r := make([]string, len(b)) + for i := range b { + r[i] = ToHex(b[i]) + } + return r +} + // FromHex returns the bytes represented by the hexadecimal string s. // s may be prefixed with "0x". func FromHex(s string) []byte { -- cgit v1.2.3