[#787] morph: Return VUB for IR service calls
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
518f3baf41
commit
2393d13e4d
12 changed files with 78 additions and 41 deletions
|
@ -36,7 +36,7 @@ func (u *UpdatePeerPrm) SetMaintenance() {
|
|||
}
|
||||
|
||||
// UpdatePeerState changes peer status through Netmap contract call.
|
||||
func (c *Client) UpdatePeerState(p UpdatePeerPrm) error {
|
||||
func (c *Client) UpdatePeerState(p UpdatePeerPrm) (uint32, error) {
|
||||
method := updateStateMethod
|
||||
|
||||
if c.client.WithNotary() && c.client.IsAlpha() {
|
||||
|
@ -55,8 +55,9 @@ func (c *Client) UpdatePeerState(p UpdatePeerPrm) error {
|
|||
prm.SetArgs(int64(p.state), p.key)
|
||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||
|
||||
if _, err := c.client.Invoke(prm); err != nil {
|
||||
return fmt.Errorf("could not invoke smart contract: %w", err)
|
||||
res, err := c.client.Invoke(prm)
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("could not invoke smart contract: %w", err)
|
||||
}
|
||||
return nil
|
||||
return res.VUB, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue