The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
woop/internal/blsgen/lib_test.go

19 lines
469 B

package blsgen
import (
"os"
"testing"
)
// TestUpdateStakingList creates a bls key with passphrase and compare it with the one loaded from the generated file.
func TestUpdateStakingList(t *testing.T) {
privateKey, fileName := GenBlsKeyWithPassPhrase("abcd")
anotherPriKey := LoadBlsKeyWithPassPhrase(fileName, "abcd")
if !privateKey.IsEqual(anotherPriKey) {
t.Error("Error when generating bls key.")
}
// Clean up the testing file.
os.Remove(fileName)
}