[#625] morph/client: make method names constant

We don't use custom names and the only place where custom method option
is used it provides the default name and can be omitted.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-01-29 16:06:36 +03:00 committed by LeL
parent 35dec2f494
commit 3c5b62d839
44 changed files with 249 additions and 1097 deletions

View file

@ -32,7 +32,7 @@ func (c *Client) UpdateInnerRing(p UpdateIRPrm) error {
prm := client.InvokePrm{}
prm.SetMethod(c.updateInnerRing)
prm.SetMethod(updateInnerRingMethod)
prm.SetArgs(args)
prm.InvokePrmOptional = p.InvokePrmOptional
@ -43,14 +43,14 @@ func (c *Client) UpdateInnerRing(p UpdateIRPrm) error {
// netmap contract.
func (c *Client) InnerRingList() (keys.PublicKeys, error) {
invokePrm := client.TestInvokePrm{}
invokePrm.SetMethod(c.innerRingList)
invokePrm.SetMethod(innerRingListMethod)
prms, err := c.client.TestInvoke(invokePrm)
if err != nil {
return nil, fmt.Errorf("could not perform test invocation (%s): %w", c.innerRingList, err)
return nil, fmt.Errorf("could not perform test invocation (%s): %w", innerRingListMethod, err)
}
return irKeysFromStackItem(prms, c.innerRingList)
return irKeysFromStackItem(prms, innerRingListMethod)
}
func irKeysFromStackItem(stack []stackitem.Item, method string) (keys.PublicKeys, error) {