Allow Parity as ingest node (#36)

* Upgrade go-ethereum to v1.8

* Add Node Info for parity nodes

* Upgrade start_private_blockchain to use v1.8
This commit is contained in:
Matt K
2018-03-07 15:29:21 -06:00
committed by GitHub
parent 203f9b47d3
commit 5a652190d9
624 changed files with 77003 additions and 14158 deletions
+21 -14
View File
@@ -17,9 +17,7 @@
// Package common contains various helper functions.
package common
import (
"encoding/hex"
)
import "encoding/hex"
func ToHex(b []byte) string {
hex := Bytes2Hex(b)
@@ -35,12 +33,11 @@ func FromHex(s string) []byte {
if s[0:2] == "0x" || s[0:2] == "0X" {
s = s[2:]
}
if len(s)%2 == 1 {
s = "0" + s
}
return Hex2Bytes(s)
}
return nil
if len(s)%2 == 1 {
s = "0" + s
}
return Hex2Bytes(s)
}
// Copy bytes
@@ -56,14 +53,24 @@ func CopyBytes(b []byte) (copiedBytes []byte) {
return
}
func HasHexPrefix(str string) bool {
l := len(str)
return l >= 2 && str[0:2] == "0x"
func hasHexPrefix(str string) bool {
return len(str) >= 2 && str[0] == '0' && (str[1] == 'x' || str[1] == 'X')
}
func IsHex(str string) bool {
l := len(str)
return l >= 4 && l%2 == 0 && str[0:2] == "0x"
func isHexCharacter(c byte) bool {
return ('0' <= c && c <= '9') || ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F')
}
func isHex(str string) bool {
if len(str)%2 != 0 {
return false
}
for _, c := range []byte(str) {
if !isHexCharacter(c) {
return false
}
}
return true
}
func Bytes2Hex(d []byte) string {