From 287fe53c70b67de766e779edad7d0616eb9e9dc6 Mon Sep 17 00:00:00 2001 From: ChihYunChuang Date: Mon, 18 Oct 2021 13:49:01 +0800 Subject: [PATCH] crypto/tss/dkg: fix tests --- crypto/ecpointgrouplaw/point_test.go | 3 ++- crypto/tss/addshare/newpeer/0_peer_handler_test.go | 2 +- crypto/tss/addshare/newpeer/1_result_handler_test.go | 2 +- crypto/tss/dkg/2_verify_handler_test.go | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crypto/ecpointgrouplaw/point_test.go b/crypto/ecpointgrouplaw/point_test.go index 8c5297c9..efc0c83b 100644 --- a/crypto/ecpointgrouplaw/point_test.go +++ b/crypto/ecpointgrouplaw/point_test.go @@ -14,10 +14,11 @@ package ecpointgrouplaw import ( - "github.com/getamis/alice/crypto/elliptic" "fmt" "math/big" + "github.com/getamis/alice/crypto/elliptic" + . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" diff --git a/crypto/tss/addshare/newpeer/0_peer_handler_test.go b/crypto/tss/addshare/newpeer/0_peer_handler_test.go index 23bfd3e3..32daaad9 100644 --- a/crypto/tss/addshare/newpeer/0_peer_handler_test.go +++ b/crypto/tss/addshare/newpeer/0_peer_handler_test.go @@ -17,9 +17,9 @@ package newpeer import ( "math/big" - "github.com/getamis/alice/crypto/elliptic" "github.com/getamis/alice/crypto/birkhoffinterpolation" "github.com/getamis/alice/crypto/ecpointgrouplaw" + "github.com/getamis/alice/crypto/elliptic" "github.com/getamis/alice/crypto/tss" "github.com/getamis/alice/crypto/tss/addshare" "github.com/getamis/alice/crypto/utils" diff --git a/crypto/tss/addshare/newpeer/1_result_handler_test.go b/crypto/tss/addshare/newpeer/1_result_handler_test.go index d662ad43..4e71a467 100644 --- a/crypto/tss/addshare/newpeer/1_result_handler_test.go +++ b/crypto/tss/addshare/newpeer/1_result_handler_test.go @@ -17,8 +17,8 @@ package newpeer import ( "math/big" - "github.com/getamis/alice/crypto/elliptic" "github.com/getamis/alice/crypto/ecpointgrouplaw" + "github.com/getamis/alice/crypto/elliptic" "github.com/getamis/alice/crypto/tss" "github.com/getamis/alice/crypto/tss/addshare" "github.com/getamis/alice/crypto/utils" diff --git a/crypto/tss/dkg/2_verify_handler_test.go b/crypto/tss/dkg/2_verify_handler_test.go index 419c6775..d969339f 100644 --- a/crypto/tss/dkg/2_verify_handler_test.go +++ b/crypto/tss/dkg/2_verify_handler_test.go @@ -133,7 +133,7 @@ var _ = Describe("verify handler, negative cases", func() { vh, ok := d.GetHandler().(*verifyHandler) Expect(ok).Should(BeTrue()) - vh.u0g = ecpointgrouplaw.NewBase(elliptic.NewEd25519()) + vh.u0g = ecpointgrouplaw.NewBase(elliptic.NewSecp256k1()) h, err := vh.Finalize(log.Discard()) Expect(err).Should(Equal(ecpointgrouplaw.ErrDifferentCurve)) Expect(h).Should(BeNil())