From 05dfd1a9e852260b9de814bfaaef691c08d3fb12 Mon Sep 17 00:00:00 2001
From: Hans Moog <hm@mkjc.net>
Date: Thu, 26 Mar 2020 12:54:56 +0100
Subject: [PATCH] Fix: fixed some typos and empty line between godoc comments
 (#308)

---
 go.sum                                               |  1 +
 .../valuetransfer/address/signaturescheme/bls.go     | 12 +++++-------
 .../address/signaturescheme/bls_test.go              |  4 ++--
 3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/go.sum b/go.sum
index c219da8b..ec54a880 100644
--- a/go.sum
+++ b/go.sum
@@ -317,6 +317,7 @@ go.dedis.ch/kyber/v3 v3.0.12 h1:15d61EyBcBoFIS97kS2c/Vz4o3FR8ALnZ2ck9J/ebYM=
 go.dedis.ch/kyber/v3 v3.0.12/go.mod h1:kXy7p3STAurkADD+/aZcsznZGKVHEqbtmdIzvPfrs1U=
 go.dedis.ch/protobuf v1.0.5/go.mod h1:eIV4wicvi6JK0q/QnfIEGeSFNG0ZeB24kzut5+HaRLo=
 go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI4=
+go.dedis.ch/protobuf v1.0.11 h1:FTYVIEzY/bfl37lu3pR4lIj+F9Vp1jE8oh91VmxKgLo=
 go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4=
 go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
 go.mongodb.org/mongo-driver v1.0.0/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
diff --git a/packages/binary/valuetransfer/address/signaturescheme/bls.go b/packages/binary/valuetransfer/address/signaturescheme/bls.go
index 5f77819e..a17fc758 100644
--- a/packages/binary/valuetransfer/address/signaturescheme/bls.go
+++ b/packages/binary/valuetransfer/address/signaturescheme/bls.go
@@ -2,14 +2,16 @@ package signaturescheme
 
 import (
 	"fmt"
-	"github.com/iotaledger/goshimmer/packages/binary/valuetransfer/address"
+	"math/rand"
+
 	"github.com/mr-tron/base58"
 	"go.dedis.ch/kyber/v3"
 	"go.dedis.ch/kyber/v3/pairing/bn256"
 	"go.dedis.ch/kyber/v3/sign"
 	"go.dedis.ch/kyber/v3/sign/bdn"
 	"go.dedis.ch/kyber/v3/util/random"
-	"math/rand"
+
+	"github.com/iotaledger/goshimmer/packages/binary/valuetransfer/address"
 )
 
 // BLS implements BLS signature scheme which is robust against rogue public key attacks, or BDN
@@ -19,7 +21,6 @@ import (
 // This package doesn't implement any threshold signature related primitives.
 // it only contains what is needed for the node to check validity of the BLS signatures against addresses
 // and also minimum signing required for testing
-
 var suite = bn256.NewSuite()
 
 const (
@@ -31,7 +32,6 @@ const (
 
 // ---------------- implements SignatureScheme interface
 // blsSignatureScheme defines an interface for the key pairs of BLS signatures.
-
 type blsSignatureScheme struct {
 	priKey kyber.Scalar
 	pubKey kyber.Point
@@ -43,7 +43,6 @@ var rnd = random.New(rand.New(rand.NewSource(42)))
 // RandBLS creates a RANDOM instance of a signature scheme, that is used to sign the corresponding address.
 // mostly intended for testing.
 // only for testing: each time same sequence!
-
 func RandBLS() SignatureScheme {
 	ret := &blsSignatureScheme{}
 	ret.priKey, ret.pubKey = bdn.NewKeyPair(suite, rnd)
@@ -52,7 +51,6 @@ func RandBLS() SignatureScheme {
 
 // BLS creates an instance of BLS signature scheme
 // from given private and public keys in marshaled binary form
-
 func BLS(priKey, pubKey []byte) (SignatureScheme, error) {
 	if len(priKey) != BLS_PRIVATE_KEY_SIZE || len(pubKey) != BLS_PUBLIC_KEY_SIZE {
 		return nil, fmt.Errorf("wrong key size")
@@ -117,7 +115,7 @@ func BLSSignatureFromBytes(data []byte) (result *blsSignature, err error, consum
 	consumedBytes = 0
 	err = nil
 	if len(data) < BLS_FULL_SIGNATURE_SIZE {
-		err = fmt.Errorf("marshalled BLS signature size must be %d", BLS_FULL_SIGNATURE_SIZE)
+		err = fmt.Errorf("marshaled BLS signature size must be %d", BLS_FULL_SIGNATURE_SIZE)
 		return
 	}
 	if data[0] != address.VERSION_BLS {
diff --git a/packages/binary/valuetransfer/address/signaturescheme/bls_test.go b/packages/binary/valuetransfer/address/signaturescheme/bls_test.go
index 28e1a3a7..9e1a38aa 100644
--- a/packages/binary/valuetransfer/address/signaturescheme/bls_test.go
+++ b/packages/binary/valuetransfer/address/signaturescheme/bls_test.go
@@ -1,14 +1,14 @@
 package signaturescheme
 
 import (
-	"github.com/magiconair/properties/assert"
 	"testing"
+
+	"github.com/magiconair/properties/assert"
 )
 
 var dataToSign = []byte("Hello Boneh-Lynn-Shacham (BLS) --> Boneh-Drijvers-Neven (BDN)")
 
 func TestBLS_base(t *testing.T) {
-
 	blsSigScheme := RandBLS()
 	t.Logf("generating random BLS signature scheme: %s\n", blsSigScheme.(*blsSignatureScheme).String())
 	signature := blsSigScheme.Sign(dataToSign)
-- 
GitLab