rpcsrv: define GetSignersWithWitnesses on a pointer

Nil receiver can be properly handled and all other `Param`'s mathods
are defined on a pointer.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2023-11-23 11:43:47 +03:00
parent 25ef2c7f16
commit 2f6ba1fded

View file

@ -394,7 +394,7 @@ func (p *Param) GetSignerWithWitness() (neorpc.SignerWithWitness, error) {
// GetSignersWithWitnesses returns a slice of SignerWithWitness with CalledByEntry // GetSignersWithWitnesses returns a slice of SignerWithWitness with CalledByEntry
// scope from an array of Uint160 or an array of serialized transaction.Signer stored // scope from an array of Uint160 or an array of serialized transaction.Signer stored
// in the parameter. // in the parameter.
func (p Param) GetSignersWithWitnesses() ([]transaction.Signer, []transaction.Witness, error) { func (p *Param) GetSignersWithWitnesses() ([]transaction.Signer, []transaction.Witness, error) {
hashes, err := p.GetArray() hashes, err := p.GetArray()
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err