[#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>
pull/234/head
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)
- Non-alphabet nodes do not try to handle alphabet events (#181)
- Failing SN and IR transactions because of incorrect scopes (#2230, #2263)
- Global scope used for some transactions (#2230, #2263)
### Removed
### Updated

View File

@ -208,10 +208,18 @@ func (c *Client) SetGroupSignerScope() error {
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,
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
}