core: implement Secp256k1 Verify and CheckMultisig interops

Closes #918.
This commit is contained in:
Anna Shaleva 2020-07-13 12:59:41 +03:00
parent 5326fc587a
commit a3e306ff78
12 changed files with 141 additions and 45 deletions

View file

@ -1,6 +1,7 @@
package core
import (
"crypto/elliptic"
"errors"
"fmt"
"math"
@ -492,7 +493,7 @@ func contractIsStandard(ic *interop.Context, v *vm.VM) error {
// contractCreateStandardAccount calculates contract scripthash for a given public key.
func contractCreateStandardAccount(ic *interop.Context, v *vm.VM) error {
h := v.Estack().Pop().Bytes()
p, err := keys.NewPublicKeyFromBytes(h)
p, err := keys.NewPublicKeyFromBytes(h, elliptic.P256())
if err != nil {
return err
}