vm: drop *vm.VM parameter of CheckMultisigPar()

It's unused. Maybe we can move it out of VM completely decoupling VM from
crypto.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
This commit is contained in:
Roman Khimov 2024-08-30 21:48:09 +03:00
parent 1b83dc2476
commit 74cf5cbeae
2 changed files with 2 additions and 2 deletions

View file

@ -32,7 +32,7 @@ func ECDSASecp256r1CheckMultisig(ic *interop.Context) error {
if len(pkeys) < len(sigs) {
return errors.New("more signatures than there are keys")
}
sigok := vm.CheckMultisigPar(ic.VM, elliptic.P256(), hash.NetSha256(ic.Network, ic.Container).BytesBE(), pkeys, sigs)
sigok := vm.CheckMultisigPar(elliptic.P256(), hash.NetSha256(ic.Network, ic.Container).BytesBE(), pkeys, sigs)
ic.VM.Estack().PushItem(stackitem.Bool(sigok))
return nil
}

View file

@ -1871,7 +1871,7 @@ func (v *VM) ContractHasTryBlock() bool {
}
// CheckMultisigPar checks if the sigs contains sufficient valid signatures.
func CheckMultisigPar(v *VM, curve elliptic.Curve, h []byte, pkeys [][]byte, sigs [][]byte) bool {
func CheckMultisigPar(curve elliptic.Curve, h []byte, pkeys [][]byte, sigs [][]byte) bool {
if len(sigs) == 1 {
return slices.ContainsFunc(pkeys, func(keyb []byte) bool {
pkey := bytesToPublicKey(keyb, curve)