aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSimon Jentzsch <simon@slock.it>2018-10-19 03:41:22 +0800
committerMartin Holst Swende <martin@swende.se>2018-10-19 03:41:22 +0800
commit97fb08342d227bbd126516083b0ddaf74e6e8468 (patch)
treeb47c7d9d8b6c1f7afdf2767d1099265a39a5fce0 /common
parentcdf5982cfca2cd7d5fea85c226af5e48fde837df (diff)
downloaddexon-97fb08342d227bbd126516083b0ddaf74e6e8468.tar
dexon-97fb08342d227bbd126516083b0ddaf74e6e8468.tar.gz
dexon-97fb08342d227bbd126516083b0ddaf74e6e8468.tar.bz2
dexon-97fb08342d227bbd126516083b0ddaf74e6e8468.tar.lz
dexon-97fb08342d227bbd126516083b0ddaf74e6e8468.tar.xz
dexon-97fb08342d227bbd126516083b0ddaf74e6e8468.tar.zst
dexon-97fb08342d227bbd126516083b0ddaf74e6e8468.zip
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
Diffstat (limited to 'common')
-rw-r--r--common/bytes.go9
1 files changed, 9 insertions, 0 deletions
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 {