From 372191dd5fc888ac21629be55fddd4fa22db06d7 Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Mon, 8 Feb 2016 00:50:52 -0800 Subject: [PATCH] KeyString() in PubKey; Fix tests --- pub_key.go | 1 + signature_test.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pub_key.go b/pub_key.go index 47eba9ed6..c5d3cadc2 100644 --- a/pub_key.go +++ b/pub_key.go @@ -13,6 +13,7 @@ import ( // PubKey is part of Account and Validator. type PubKey interface { Address() []byte + KeyString() string VerifyBytes(msg []byte, sig Signature) bool } diff --git a/signature_test.go b/signature_test.go index 1dbc58096..b7eec577f 100644 --- a/signature_test.go +++ b/signature_test.go @@ -42,7 +42,7 @@ func TestBinaryDecode(t *testing.T) { sig := privKey.Sign(msg) t.Logf("msg: %X, sig: %X", msg, sig) - buf, n, err := new(bytes.Buffer), new(int64), new(error) + buf, n, err := new(bytes.Buffer), new(int), new(error) wire.WriteBinary(sig, buf, n, err) if *err != nil { t.Fatalf("Failed to write Signature: %v", err) @@ -56,7 +56,7 @@ func TestBinaryDecode(t *testing.T) { t.Fatalf("Unexpected signature type byte") } - sig2, ok := wire.ReadBinary(SignatureEd25519{}, buf, n, err).(SignatureEd25519) + sig2, ok := wire.ReadBinary(SignatureEd25519{}, buf, 0, n, err).(SignatureEd25519) if !ok || *err != nil { t.Fatalf("Failed to read Signature: %v", err) }