mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-01-08 15:45:15 +00:00
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:
parent
1b83dc2476
commit
74cf5cbeae
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue