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
This commit is contained in:
Simon Jentzsch
2018-10-18 21:41:22 +02:00
committed by Martin Holst Swende
parent cdf5982cfc
commit 97fb08342d
4 changed files with 105 additions and 0 deletions

View File

@ -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 {