From 74afcbe409d9218b41dab0fa8313b7e75b91b9b1 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Wed, 8 Sep 2021 17:52:40 +0300 Subject: [PATCH] [#815] pkg/morph/netmap: Add `Morph()` method Signed-off-by: Pavel Karpy --- pkg/morph/client/netmap/client.go | 5 +++++ pkg/morph/client/netmap/wrapper/wrapper.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/pkg/morph/client/netmap/client.go b/pkg/morph/client/netmap/client.go index e1e2a1aab..73a38c5a4 100644 --- a/pkg/morph/client/netmap/client.go +++ b/pkg/morph/client/netmap/client.go @@ -112,6 +112,11 @@ func New(c *client.StaticClient, opts ...Option) (*Client, error) { return res, nil } +// Morph returns raw morph client. +func (c Client) Morph() *client.Client { + return c.client.Morph() +} + // WithAddPeerMethod returns a client constructor option that // specifies the method name of adding peer operation. // diff --git a/pkg/morph/client/netmap/wrapper/wrapper.go b/pkg/morph/client/netmap/wrapper/wrapper.go index 133258096..c9ae33756 100644 --- a/pkg/morph/client/netmap/wrapper/wrapper.go +++ b/pkg/morph/client/netmap/wrapper/wrapper.go @@ -53,6 +53,11 @@ func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8, return &Wrapper{client: enhancedNetmapClient}, nil } +// Morph returns raw morph client. +func (w Wrapper) Morph() *client.Client { + return w.client.Morph() +} + // TryNotary returns option to enable // notary invocation tries. func TryNotary() Option {