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
|
@ -54,6 +54,16 @@ type singleClient struct {
|
|||
notary *notary
|
||||
}
|
||||
|
||||
func blankSingleClient(cli *client.Client, w *wallet.Account, cfg *cfg) *singleClient {
|
||||
return &singleClient{
|
||||
logger: cfg.logger,
|
||||
client: cli,
|
||||
acc: w,
|
||||
waitInterval: cfg.waitInterval,
|
||||
signer: cfg.signer,
|
||||
}
|
||||
}
|
||||
|
||||
// ErrNilClient is returned by functions that expect
|
||||
// a non-nil Client pointer, but received nil.
|
||||
var ErrNilClient = errors.New("client is nil")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue