forked from TrueCloudLab/frostfs-node
[#837] morph: Add WithSingleClient
client constructor option
`WithSingleClient` allows Morph client creation with existing raw neo-go client. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
264ab489bb
commit
5e74830c38
4 changed files with 74 additions and 26 deletions
|
@ -36,15 +36,11 @@ func (x *multiClient) createForAddress(addr string) (*Client, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
sCli := blankSingleClient(cli, x.account, &x.cfg)
|
||||
sCli.notary = x.sharedNotary
|
||||
|
||||
c := &Client{
|
||||
singleClient: &singleClient{
|
||||
logger: x.cfg.logger,
|
||||
client: cli,
|
||||
acc: x.account,
|
||||
waitInterval: x.cfg.waitInterval,
|
||||
signer: x.cfg.signer,
|
||||
notary: x.sharedNotary,
|
||||
},
|
||||
singleClient: sCli,
|
||||
}
|
||||
|
||||
x.clients[addr] = c
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue