[#239] morph/client: Recreate actor/wrappers in SetGroupSignerScope

That's the reason #2230 and #2263 were not detected earlier, we actually had
Global scope being used before reconnection to RPC node.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Roman Khimov 2023-02-17 22:32:31 +03:00 committed by fyrchik
parent be4df989e5
commit f41ad9d419
2 changed files with 10 additions and 1 deletions

View file

@ -65,6 +65,7 @@ Changelog for FrostFS Node
- Parts of a locked object could not be removed anymore (#141) - Parts of a locked object could not be removed anymore (#141)
- Non-alphabet nodes do not try to handle alphabet events (#181) - Non-alphabet nodes do not try to handle alphabet events (#181)
- Failing SN and IR transactions because of incorrect scopes (#2230, #2263) - Failing SN and IR transactions because of incorrect scopes (#2230, #2263)
- Global scope used for some transactions (#2230, #2263)
### Removed ### Removed
### Updated ### Updated

View file

@ -208,10 +208,18 @@ func (c *Client) SetGroupSignerScope() error {
return err return err
} }
c.cfg.signer = &transaction.Signer{ // Don't change c before everything is OK.
cfg := c.cfg
cfg.signer = &transaction.Signer{
Scopes: transaction.CustomGroups | transaction.CalledByEntry, Scopes: transaction.CustomGroups | transaction.CalledByEntry,
AllowedGroups: []*keys.PublicKey{pub}, AllowedGroups: []*keys.PublicKey{pub},
} }
rpcActor, err := newActor(c.client, c.acc, cfg)
if err != nil {
return err
}
c.cfg = cfg
c.setActor(rpcActor)
return nil return nil
} }