forked from TrueCloudLab/frostfs-node
[#496] Remove unused type aliases and errors
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
2b2b2c2c45
commit
b21a6ccede
3 changed files with 3 additions and 31 deletions
|
@ -1,7 +1,6 @@
|
|||
package wrapper
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neo-go/pkg/encoding/fixedn"
|
||||
|
@ -10,12 +9,6 @@ import (
|
|||
"github.com/nspcc-dev/neofs-node/pkg/morph/client/balance"
|
||||
)
|
||||
|
||||
// Client represents the Balance contract client.
|
||||
//
|
||||
// It is a type alias of
|
||||
// github.com/nspcc-dev/neofs-node/pkg/morph/client/balance.Client.
|
||||
type Client = balance.Client
|
||||
|
||||
// Wrapper is a wrapper over balance contract
|
||||
// client which implements:
|
||||
// * tool for obtaining the amount of funds in the client's account;
|
||||
|
@ -26,13 +19,9 @@ type Client = balance.Client
|
|||
// expression (or just declaring a Wrapper variable) is unsafe
|
||||
// and can lead to panic.
|
||||
type Wrapper struct {
|
||||
client *Client
|
||||
client *balance.Client
|
||||
}
|
||||
|
||||
// ErrNilWrapper is returned by functions that expect
|
||||
// a non-nil Wrapper pointer, but received nil.
|
||||
var ErrNilWrapper = errors.New("balance contract client wrapper is nil")
|
||||
|
||||
// NewFromMorph returns the wrapper instance from the raw morph client.
|
||||
func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8) (*Wrapper, error) {
|
||||
staticClient, err := client.NewStatic(cli, contract, fee)
|
||||
|
|
|
@ -9,12 +9,6 @@ import (
|
|||
"github.com/nspcc-dev/neofs-node/pkg/morph/client/container"
|
||||
)
|
||||
|
||||
// Client represents the Container contract client.
|
||||
//
|
||||
// It is a type alias of
|
||||
// github.com/nspcc-dev/neofs-node/pkg/morph/client/container.Client.
|
||||
type Client = container.Client
|
||||
|
||||
// Wrapper is a wrapper over container contract
|
||||
// client which implements container storage and
|
||||
// eACL storage methods.
|
||||
|
@ -24,7 +18,7 @@ type Client = container.Client
|
|||
// expression (or just declaring a Wrapper variable) is unsafe
|
||||
// and can lead to panic.
|
||||
type Wrapper struct {
|
||||
client *Client
|
||||
client *container.Client
|
||||
}
|
||||
|
||||
// NewFromMorph returns the wrapper instance from the raw morph client.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package wrapper
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neo-go/pkg/encoding/fixedn"
|
||||
|
@ -10,12 +9,6 @@ import (
|
|||
"github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap"
|
||||
)
|
||||
|
||||
// Client represents the Netmap contract client.
|
||||
//
|
||||
// It is a type alias of
|
||||
// github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap.Client.
|
||||
type Client = netmap.Client
|
||||
|
||||
// Wrapper is a wrapper over netmap contract
|
||||
// client which implements:
|
||||
// * network map storage;
|
||||
|
@ -26,13 +19,9 @@ type Client = netmap.Client
|
|||
// expression (or just declaring a Wrapper variable) is unsafe
|
||||
// and can lead to panic.
|
||||
type Wrapper struct {
|
||||
client *Client
|
||||
client *netmap.Client
|
||||
}
|
||||
|
||||
// ErrNilWrapper is returned by functions that expect
|
||||
// a non-nil Wrapper pointer, but received nil.
|
||||
var ErrNilWrapper = errors.New("netmap contract client wrapper is nil")
|
||||
|
||||
// NewFromMorph returns the wrapper instance from the raw morph client.
|
||||
func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8) (*Wrapper, error) {
|
||||
staticClient, err := client.NewStatic(cli, contract, fee)
|
||||
|
|
Loading…
Reference in a new issue