diff options
author | Simon Jentzsch <simon@slock.it> | 2018-10-19 03:41:22 +0800 |
---|---|---|
committer | Martin Holst Swende <martin@swende.se> | 2018-10-19 03:41:22 +0800 |
commit | 97fb08342d227bbd126516083b0ddaf74e6e8468 (patch) | |
tree | b47c7d9d8b6c1f7afdf2767d1099265a39a5fce0 /common | |
parent | cdf5982cfca2cd7d5fea85c226af5e48fde837df (diff) | |
download | go-tangerine-97fb08342d227bbd126516083b0ddaf74e6e8468.tar.gz go-tangerine-97fb08342d227bbd126516083b0ddaf74e6e8468.tar.zst go-tangerine-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.go | 9 |
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 { |