From 559bccccd40d028e412d9f11709ded0250ba6dcd Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Tue, 24 May 2022 23:33:38 +0200 Subject: implement primary and secondary role, for replication --- pkg/state/mocks/signer.go | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 pkg/state/mocks/signer.go (limited to 'pkg/state/mocks/signer.go') diff --git a/pkg/state/mocks/signer.go b/pkg/state/mocks/signer.go deleted file mode 100644 index 7c699dd..0000000 --- a/pkg/state/mocks/signer.go +++ /dev/null @@ -1,23 +0,0 @@ -package mocks - -import ( - "crypto" - "crypto/ed25519" - "io" -) - -// TestSign implements the signer interface. It can be used to mock an Ed25519 -// signer that always return the same public key, signature, and error. -type TestSigner struct { - PublicKey [ed25519.PublicKeySize]byte - Signature [ed25519.SignatureSize]byte - Error error -} - -func (ts *TestSigner) Public() crypto.PublicKey { - return ed25519.PublicKey(ts.PublicKey[:]) -} - -func (ts *TestSigner) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error) { - return ts.Signature[:], ts.Error -} -- cgit v1.2.3