diff --git a/core/util/utils_test.go b/core/util/utils_test.go index c2f2b3eb8be..6969f8b18b0 100644 --- a/core/util/utils_test.go +++ b/core/util/utils_test.go @@ -69,19 +69,16 @@ func TestGenerateHashFromSignature(t *testing.T) { } } -func TestGenerateUUIDfromTxSHAHash(t *testing.T) { - uuid := GenerateUUIDfromTxSHAHash([]byte("foobar")) - if len(uuid) != 36 { - t.Fatalf("UUID length is not correct. Expected = 36, Got = %d", len(uuid)) - } - uuid2 := GenerateUUIDfromTxSHAHash([]byte("foobar1")) - if uuid == uuid2 { - t.Fatalf("Two UUIDs are equal. This should never occur") +func TestGeneratIDfromTxSHAHash(t *testing.T) { + txid := GenerateIDfromTxSHAHash([]byte("foobar")) + txid2 := GenerateIDfromTxSHAHash([]byte("foobar1")) + if txid == txid2 { + t.Fatalf("Two TxIDs are equal. This should never occur") } } func TestGenerateIDWithAlg(t *testing.T) { - _, err := GenerateIDWithAlg("sha256base64", "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") + _, err := GenerateIDWithAlg("sha256", []byte{1, 1, 1, 1}) if err != nil { t.Fatalf("Decoder failure: %v", err) }