From ba48071e2defaaecd43fedbe2b93557b658856c5 Mon Sep 17 00:00:00 2001 From: nisdas Date: Fri, 4 May 2018 21:03:46 +0800 Subject: [PATCH] sharding/client: Removing errors(#92) Former-commit-id: 0c678a1778c83476c688a1bf1353aaba8cde10dc [formerly 7c5f2802600371759e1c62a64be357d05f8a2012] Former-commit-id: 34566a72446f3e902095da0b57bf4007683068f1 --- sharding/client/utils.go | 2 +- sharding/client/utils_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sharding/client/utils.go b/sharding/client/utils.go index cffa0d67f..948043adc 100644 --- a/sharding/client/utils.go +++ b/sharding/client/utils.go @@ -138,7 +138,7 @@ func Serialize(rawtx []interface{}) ([]byte, error) { data := rawtx[i] refinedData, err := serializeBlob(data) if err != nil { - return nil, fmt.Errorf("Error: %v at index: %v %v %v", err, i, data, rawtx) + return nil, fmt.Errorf("Error: %v at index: %v", i, err) } serialisedData = append(serialisedData, refinedData...) diff --git a/sharding/client/utils_test.go b/sharding/client/utils_test.go index 3b17b730c..9f7ef0001 100644 --- a/sharding/client/utils_test.go +++ b/sharding/client/utils_test.go @@ -53,14 +53,14 @@ func TestSize(t *testing.T) { if int64(len(serializedblob)) != sizeafterSerialize { - t.Fatalf("Error Serializing blob,Lengths are not the same: %v , %v", int64(len(serializedblob)), sizeafterSerialize) + t.Fatalf("Error Serializing blobs the lengths are not the same: %v , %v", int64(len(serializedblob)), sizeafterSerialize) } } func TestSerializeAndDeserializeblob(t *testing.T) { - blob := buildtxblobs(31) + blob := buildtxblobs(30) serializedblob, err := Serialize(blob) @@ -74,7 +74,7 @@ func TestSerializeAndDeserializeblob(t *testing.T) { if !reflect.DeepEqual(blob, testbody) { - t.Fatalf("Error Serializing blob with %v %v", blob, testbody) + t.Fatalf("Error Serializing blobs, the serialized and deserialized versions are not the same: %v %v", blob, testbody) } }