Commit f803e5ec authored by QM's avatar QM

fix unit test

parent 6704bc83
......@@ -70,7 +70,7 @@ func testBlsSign(t *testing.T, cryptCli crypto.Crypto) {
PriKS := "6da92a632ab7deb67d38c0f6560bcfed28167998f6496db64c258d5e8393a81b"
commit := &pt.ParacrossCommitAction{Status: status}
client := &blsClient{cryptoCli: cryptCli}
client := &blsClient{cryptoCli: cryptCli, typeNode: pt.ParaCommitSuperNode}
client.peersBlsPubKey = make(map[string]crypto.PubKey)
p, err := common.FromHex(PriKS)
......@@ -102,6 +102,7 @@ func testBlsSign(t *testing.T, cryptCli crypto.Crypto) {
func testVerifyBlsSign(t *testing.T, cryptCli crypto.Crypto) {
client := &blsClient{cryptoCli: cryptCli}
client.peersBlsPubKey = make(map[string]crypto.PubKey)
client.typeNode = pt.ParaCommitSuperNode
KS := "1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4"
PubKS := "a3d97d4186c80268fe6d3689dd574599e25df2dffdcff03f7d8ef64a3bd483241b7d0985958990de2d373d5604caf805"
......@@ -126,7 +127,7 @@ func testVerifyBlsSign(t *testing.T, cryptCli crypto.Crypto) {
data := "0x1a0c757365722e702e706172612e"
msg, err := common.FromHex(data)
assert.NoError(t, err)
types.Decode(msg, status)
_ = types.Decode(msg, status)
commit.Status = status
commit.Bls = blsInfo
err = client.verifyBlsSign(KS, commit)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment