This commit is contained in:
8go 2016-03-10 22:08:36 +01:00
parent dbaed09e19
commit 416f46ac99
2 changed files with 1 additions and 5 deletions

View file

@ -350,7 +350,6 @@ func zeroBytes(bytes []byte) {
}
}
// for input read: https://github.com/ethereum/EIPs/issues/55
// modelled after the JavaScript function toChecksumAddress()
// Convert address into checksummed address
@ -374,4 +373,3 @@ func ChecksumAddress(a common.Address) string {
func ChecksumAddressHex(s string) string {
return ChecksumAddress(common.HexToAddress(strings.Replace(strings.ToLower(s), "0x", "", 1)))
}

View file

@ -24,9 +24,9 @@ import (
"io/ioutil"
"math/big"
"os"
"strings"
"testing"
"time"
"strings"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto/secp256k1"
@ -249,7 +249,6 @@ func TestPythonIntegration(t *testing.T) {
fmt.Printf("msg: %x, privkey: %x sig: %x\n", msg1, k1, sig1)
}
func TestChecksumAddress(t *testing.T) {
// 4 groups of tests:
// All caps
@ -386,4 +385,3 @@ func TestChecksumAddressHex(t *testing.T) {
}
fmt.Printf("Passed %d tests and failed %d tests out of %d.\n", passed, failed, passed+failed)
}