X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=blobdiff_plain;f=protocol%2Fvm%2Fcrypto_test.go;h=6c1432982a328bf7ac20ccff74a8b7333074c60a;hp=48372b906d6a606f4219a33c284c1b76de096442;hb=cb120a52d80aaf7c52f101644b5aa2f521588382;hpb=4e7f502753546efa47d58ab770a5c275e7b41c77 diff --git a/protocol/vm/crypto_test.go b/protocol/vm/crypto_test.go index 48372b90..6c143298 100644 --- a/protocol/vm/crypto_test.go +++ b/protocol/vm/crypto_test.go @@ -85,9 +85,6 @@ func TestCheckSig(t *testing.T) { } func TestCryptoOps(t *testing.T) { - OP_SM3 := Op(0xb0) - ops[OP_SM3] = opInfo{OP_SM3, "SM3", opSm3} - type testStruct struct { op Op startVM *virtualMachine @@ -171,32 +168,6 @@ func TestCryptoOps(t *testing.T) { }}, }, }, { - op: OP_SM3, - startVM: &virtualMachine{ - runLimit: 50000, - dataStack: [][]byte{{1}}, - }, - wantVM: &virtualMachine{ - runLimit: 49905, - dataStack: [][]byte{{ - 121, 155, 113, 154, 192, 49, 252, 137, 198, 216, 146, 90, 72, 125, 173, 7, - 48, 143, 131, 123, 122, 183, 187, 199, 206, 189, 58, 65, 24, 253, 47, 56, - }}, - }, - }, { - op: OP_SM3, - startVM: &virtualMachine{ - runLimit: 50000, - dataStack: [][]byte{make([]byte, 65)}, - }, - wantVM: &virtualMachine{ - runLimit: 49968, - dataStack: [][]byte{{ - 177, 247, 110, 45, 29, 65, 214, 241, 187, 59, 9, 192, 155, 130, 25, 218, - 251, 173, 112, 13, 242, 72, 34, 32, 200, 146, 190, 65, 68, 90, 34, 255, - }}, - }, - }, { op: OP_CHECKSIG, startVM: &virtualMachine{ runLimit: 50000, @@ -450,7 +421,7 @@ func TestCryptoOps(t *testing.T) { wantErr: ErrRunLimitExceeded, }} - hashOps := []Op{OP_SHA256, OP_SHA3, OP_SM3} + hashOps := []Op{OP_SHA256, OP_SHA3} for _, op := range hashOps { cases = append(cases, testStruct{ op: op,