aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/key_store_test.go
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2015-10-07 00:39:42 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-10-13 23:44:14 +0800
commit2db97986460c57ba74a563d97a704a45a270df7d (patch)
treeca25e74a5436945c20bb0b95281235d43a2d2167 /crypto/key_store_test.go
parent44fd3951410fb5923d7e578ac97942a7ea791e96 (diff)
downloadgo-tangerine-2db97986460c57ba74a563d97a704a45a270df7d.tar.gz
go-tangerine-2db97986460c57ba74a563d97a704a45a270df7d.tar.zst
go-tangerine-2db97986460c57ba74a563d97a704a45a270df7d.zip
common, crypto: add ICAP functions
Diffstat (limited to 'crypto/key_store_test.go')
-rw-r--r--crypto/key_store_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/key_store_test.go b/crypto/key_store_test.go
index fda87ddc8..de4a21dcf 100644
--- a/crypto/key_store_test.go
+++ b/crypto/key_store_test.go
@@ -20,6 +20,7 @@ import (
"encoding/hex"
"fmt"
"reflect"
+ "strings"
"testing"
"github.com/ethereum/go-ethereum/common"
@@ -223,3 +224,10 @@ func loadKeyStoreTestV1(file string, t *testing.T) map[string]KeyStoreTestV1 {
}
return tests
}
+
+func TestKeyForDirectICAP(t *testing.T) {
+ key := NewKeyForDirectICAP(randentropy.Reader)
+ if !strings.HasPrefix(key.Address.Hex(), "0x00") {
+ t.Errorf("Expected first address byte to be zero, have: %s", key.Address.Hex())
+ }
+}