forked from TrueCloudLab/frostfs-node
[#1] Fix comments and error messages
Signed-off-by: Stanislav Bogatyrev <s.bogatyrev@yadro.com>
This commit is contained in:
parent
c761a95eef
commit
cb016d53a6
96 changed files with 167 additions and 167 deletions
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
// Client is a wrapper over StaticClient
|
||||
// which makes calls with the names and arguments
|
||||
// of the NeoFS Audit contract.
|
||||
// of the FrostFS Audit contract.
|
||||
//
|
||||
// Working client must be created via constructor New.
|
||||
// Using the Client that has been created with new(Client)
|
||||
|
|
|
@ -22,7 +22,7 @@ func (p *PutPrm) SetResult(result *auditAPI.Result) {
|
|||
p.result = result
|
||||
}
|
||||
|
||||
// PutAuditResult saves passed audit result structure in NeoFS system
|
||||
// PutAuditResult saves passed audit result structure in FrostFS system
|
||||
// through Audit contract call.
|
||||
//
|
||||
// Returns encountered error that caused the saving to interrupt.
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
// Client is a wrapper over StaticClient
|
||||
// which makes calls with the names and arguments
|
||||
// of the NeoFS Balance contract.
|
||||
// of the FrostFS Balance contract.
|
||||
//
|
||||
// Working client must be created via constructor New.
|
||||
// Using the Client that has been created with new(Client)
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
|
||||
// Client is a wrapper over StaticClient
|
||||
// which makes calls with the names and arguments
|
||||
// of the NeoFS Container contract.
|
||||
// of the FrostFS Container contract.
|
||||
//
|
||||
// Working client must be created via constructor New.
|
||||
// Using the Client that has been created with new(Client)
|
||||
|
|
|
@ -52,7 +52,7 @@ func (d *DeletePrm) SetToken(token []byte) {
|
|||
d.token = token
|
||||
}
|
||||
|
||||
// Delete removes the container from NeoFS system
|
||||
// Delete removes the container from FrostFS system
|
||||
// through Container contract call.
|
||||
//
|
||||
// Returns any error encountered that caused
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"github.com/TrueCloudLab/frostfs-sdk-go/session"
|
||||
)
|
||||
|
||||
// GetEACL reads the extended ACL table from NeoFS system
|
||||
// GetEACL reads the extended ACL table from FrostFS system
|
||||
// through Container contract call.
|
||||
//
|
||||
// Returns apistatus.EACLNotFound if eACL table is missing in the contract.
|
||||
|
|
|
@ -72,7 +72,7 @@ func (p *PutEACLPrm) SetToken(token []byte) {
|
|||
}
|
||||
|
||||
// PutEACL saves binary eACL table with its session token, key and signature
|
||||
// in NeoFS system through Container contract call.
|
||||
// in FrostFS system through Container contract call.
|
||||
//
|
||||
// Returns any error encountered that caused the saving to interrupt.
|
||||
func (c *Client) PutEACL(p PutEACLPrm) error {
|
||||
|
|
|
@ -35,7 +35,7 @@ func Get(c *Client, cnr cid.ID) (*containercore.Container, error) {
|
|||
return c.Get(binCnr)
|
||||
}
|
||||
|
||||
// Get reads the container from NeoFS system by binary identifier
|
||||
// Get reads the container from FrostFS system by binary identifier
|
||||
// through Container contract call.
|
||||
//
|
||||
// If an empty slice is returned for the requested identifier,
|
||||
|
|
|
@ -9,10 +9,10 @@ import (
|
|||
)
|
||||
|
||||
// List returns a list of container identifiers belonging
|
||||
// to the specified user of NeoFS system. The list is composed
|
||||
// to the specified user of FrostFS system. The list is composed
|
||||
// through Container contract call.
|
||||
//
|
||||
// Returns the identifiers of all NeoFS containers if pointer
|
||||
// Returns the identifiers of all FrostFS containers if pointer
|
||||
// to user identifier is nil.
|
||||
func (c *Client) List(idUser *user.ID) ([]cid.ID, error) {
|
||||
var rawID []byte
|
||||
|
|
|
@ -29,7 +29,7 @@ func (a2 *AnnounceLoadPrm) SetReporter(key []byte) {
|
|||
}
|
||||
|
||||
// AnnounceLoad saves container size estimation calculated by storage node
|
||||
// with key in NeoFS system through Container contract call.
|
||||
// with key in FrostFS system through Container contract call.
|
||||
//
|
||||
// Returns any error encountered that caused the saving to interrupt.
|
||||
func (c *Client) AnnounceLoad(p AnnounceLoadPrm) error {
|
||||
|
|
|
@ -89,7 +89,7 @@ func (p *PutPrm) SetZone(zone string) {
|
|||
}
|
||||
|
||||
// Put saves binary container with its session token, key and signature
|
||||
// in NeoFS system through Container contract call.
|
||||
// in FrostFS system through Container contract call.
|
||||
//
|
||||
// Returns calculated container identifier and any error
|
||||
// encountered that caused the saving to interrupt.
|
||||
|
|
|
@ -19,7 +19,7 @@ func (x *commonBindArgs) SetOptionalPrm(op client.InvokePrmOptional) {
|
|||
x.InvokePrmOptional = op
|
||||
}
|
||||
|
||||
// SetScriptHash sets script hash of the NeoFS account identifier.
|
||||
// SetScriptHash sets script hash of the FrostFS account identifier.
|
||||
func (x *commonBindArgs) SetScriptHash(v []byte) {
|
||||
x.scriptHash = v
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ type BindKeysPrm struct {
|
|||
commonBindArgs
|
||||
}
|
||||
|
||||
// BindKeys binds list of public keys from NeoFS account by script hash.
|
||||
// BindKeys binds list of public keys from FrostFS account by script hash.
|
||||
func (x *Client) BindKeys(p BindKeysPrm) error {
|
||||
prm := client.InvokePrm{}
|
||||
prm.SetMethod(bindKeysMethod)
|
||||
|
@ -55,7 +55,7 @@ type UnbindKeysPrm struct {
|
|||
}
|
||||
|
||||
// UnbindKeys invokes the call of key unbinding method
|
||||
// of NeoFS contract.
|
||||
// of FrostFS contract.
|
||||
func (x *Client) UnbindKeys(args UnbindKeysPrm) error {
|
||||
prm := client.InvokePrm{}
|
||||
prm.SetMethod(unbindKeysMethod)
|
||||
|
|
|
@ -36,7 +36,7 @@ func (c *ChequePrm) SetLock(lock util.Uint160) {
|
|||
c.lock = lock
|
||||
}
|
||||
|
||||
// Cheque invokes `cheque` method of NeoFS contract.
|
||||
// Cheque invokes `cheque` method of FrostFS contract.
|
||||
func (x *Client) Cheque(p ChequePrm) error {
|
||||
prm := client.InvokePrm{}
|
||||
prm.SetMethod(chequeMethod)
|
||||
|
|
|
@ -27,7 +27,7 @@ const (
|
|||
chequeMethod = "cheque"
|
||||
)
|
||||
|
||||
// NewFromMorph wraps client to work with NeoFS contract.
|
||||
// NewFromMorph wraps client to work with FrostFS contract.
|
||||
func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8, opts ...Option) (*Client, error) {
|
||||
o := defaultOpts()
|
||||
|
||||
|
@ -37,7 +37,7 @@ func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8,
|
|||
|
||||
sc, err := client.NewStatic(cli, contract, fee, ([]client.StaticClientOption)(*o)...)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not create client of NeoFS contract: %w", err)
|
||||
return nil, fmt.Errorf("could not create client of FrostFS contract: %w", err)
|
||||
}
|
||||
|
||||
return &Client{client: sc}, nil
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
)
|
||||
|
||||
type CommonBindPrm struct {
|
||||
ownerID []byte // NeoFS account identifier
|
||||
ownerID []byte // FrostFS account identifier
|
||||
|
||||
keys [][]byte // list of serialized public keys
|
||||
|
||||
|
@ -18,7 +18,7 @@ func (x *CommonBindPrm) SetOptionalPrm(prm client.InvokePrmOptional) {
|
|||
x.InvokePrmOptional = prm
|
||||
}
|
||||
|
||||
// SetOwnerID sets NeoFS account identifier.
|
||||
// SetOwnerID sets FrostFS account identifier.
|
||||
func (x *CommonBindPrm) SetOwnerID(v []byte) {
|
||||
x.ownerID = v
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ func (x *CommonBindPrm) SetKeys(v [][]byte) {
|
|||
x.keys = v
|
||||
}
|
||||
|
||||
// AddKeys adds a list of public keys to/from NeoFS account.
|
||||
// AddKeys adds a list of public keys to/from FrostFS account.
|
||||
func (x *Client) AddKeys(p CommonBindPrm) error {
|
||||
prm := client.InvokePrm{}
|
||||
|
||||
|
@ -44,7 +44,7 @@ func (x *Client) AddKeys(p CommonBindPrm) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// RemoveKeys removes a list of public keys to/from NeoFS account.
|
||||
// RemoveKeys removes a list of public keys to/from FrostFS account.
|
||||
func (x *Client) RemoveKeys(args CommonBindPrm) error {
|
||||
prm := client.InvokePrm{}
|
||||
|
||||
|
|
|
@ -10,14 +10,14 @@ import (
|
|||
|
||||
// Client is a wrapper over StaticClient
|
||||
// which makes calls with the names and arguments
|
||||
// of the NeoFS ID contract.
|
||||
// of the FrostFS ID contract.
|
||||
//
|
||||
// Working client must be created via constructor New.
|
||||
// Using the Client that has been created with new(Client)
|
||||
// expression (or just declaring a Client variable) is unsafe
|
||||
// and can lead to panic.
|
||||
type Client struct {
|
||||
client *client.StaticClient // static NeoFS ID contract client
|
||||
client *client.StaticClient // static FrostFS ID contract client
|
||||
}
|
||||
|
||||
const (
|
||||
|
@ -26,7 +26,7 @@ const (
|
|||
removeKeysMethod = "removeKey"
|
||||
)
|
||||
|
||||
// NewFromMorph wraps client to work with NeoFS ID contract.
|
||||
// NewFromMorph wraps client to work with FrostFS ID contract.
|
||||
func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8, opts ...Option) (*Client, error) {
|
||||
o := defaultOpts()
|
||||
|
||||
|
@ -36,7 +36,7 @@ func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8,
|
|||
|
||||
sc, err := client.NewStatic(cli, contract, fee, ([]client.StaticClientOption)(*o)...)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not create client of NeoFS ID contract: %w", err)
|
||||
return nil, fmt.Errorf("could not create client of FrostFS ID contract: %w", err)
|
||||
}
|
||||
|
||||
return &Client{client: sc}, nil
|
||||
|
|
|
@ -19,7 +19,7 @@ func (a *AccountKeysPrm) SetID(id user.ID) {
|
|||
a.id = id
|
||||
}
|
||||
|
||||
// AccountKeys requests public keys of NeoFS account from NeoFS ID contract.
|
||||
// AccountKeys requests public keys of FrostFS account from FrostFS ID contract.
|
||||
func (x *Client) AccountKeys(p AccountKeysPrm) (keys.PublicKeys, error) {
|
||||
prm := client.TestInvokePrm{}
|
||||
prm.SetMethod(keyListingMethod)
|
||||
|
|
|
@ -19,7 +19,7 @@ func (a *AddPeerPrm) SetNodeInfo(nodeInfo netmap.NodeInfo) {
|
|||
a.nodeInfo = nodeInfo
|
||||
}
|
||||
|
||||
// AddPeer registers peer in NeoFS network through
|
||||
// AddPeer registers peer in FrostFS network through
|
||||
// Netmap contract call.
|
||||
func (c *Client) AddPeer(p AddPeerPrm) error {
|
||||
var method = addPeerMethod
|
||||
|
|
|
@ -13,7 +13,7 @@ type NodeInfo = netmap.NodeInfo
|
|||
|
||||
// Client is a wrapper over StaticClient
|
||||
// which makes calls with the names and arguments
|
||||
// of the NeoFS Netmap contract.
|
||||
// of the FrostFS Netmap contract.
|
||||
//
|
||||
// Working client must be created via constructor New.
|
||||
// Using the Client that has been created with new(Client)
|
||||
|
|
|
@ -58,7 +58,7 @@ func (c *Client) AuditFee() (uint64, error) {
|
|||
return fee, nil
|
||||
}
|
||||
|
||||
// EpochDuration returns number of sidechain blocks per one NeoFS epoch.
|
||||
// EpochDuration returns number of sidechain blocks per one FrostFS epoch.
|
||||
func (c *Client) EpochDuration() (uint64, error) {
|
||||
epochDuration, err := c.readUInt64Config(epochDurationConfig)
|
||||
if err != nil {
|
||||
|
@ -132,7 +132,7 @@ func (c *Client) InnerRingCandidateFee() (uint64, error) {
|
|||
}
|
||||
|
||||
// WithdrawFee returns global configuration value of fee paid by user to
|
||||
// withdraw assets from NeoFS contract.
|
||||
// withdraw assets from FrostFS contract.
|
||||
func (c *Client) WithdrawFee() (uint64, error) {
|
||||
fee, err := c.readUInt64Config(withdrawFeeConfig)
|
||||
if err != nil {
|
||||
|
@ -143,7 +143,7 @@ func (c *Client) WithdrawFee() (uint64, error) {
|
|||
}
|
||||
|
||||
// MaintenanceModeAllowed reads admission of "maintenance" state from the
|
||||
// NeoFS network configuration stored in the Sidechain. The admission means
|
||||
// FrostFS network configuration stored in the Sidechain. The admission means
|
||||
// that storage nodes are allowed to switch their state to "maintenance".
|
||||
//
|
||||
// By default, maintenance state is disallowed.
|
||||
|
@ -171,7 +171,7 @@ func (c *Client) readStringConfig(key string) (string, error) {
|
|||
return v.(string), nil
|
||||
}
|
||||
|
||||
// reads boolean value by the given key from the NeoFS network configuration
|
||||
// reads boolean value by the given key from the FrostFS network configuration
|
||||
// stored in the Sidechain. Returns false if key is not presented.
|
||||
func (c *Client) readBoolConfig(key string) (bool, error) {
|
||||
v, err := c.config([]byte(key), BoolAssert)
|
||||
|
@ -221,8 +221,8 @@ func (c *Client) SetConfig(p SetConfigPrm) error {
|
|||
return c.client.Invoke(prm)
|
||||
}
|
||||
|
||||
// RawNetworkParameter is a NeoFS network parameter which is transmitted but
|
||||
// not interpreted by the NeoFS API protocol.
|
||||
// RawNetworkParameter is a FrostFS network parameter which is transmitted but
|
||||
// not interpreted by the FrostFS API protocol.
|
||||
type RawNetworkParameter struct {
|
||||
// Name of the parameter.
|
||||
Name string
|
||||
|
@ -231,8 +231,8 @@ type RawNetworkParameter struct {
|
|||
Value []byte
|
||||
}
|
||||
|
||||
// NetworkConfiguration represents NeoFS network configuration stored
|
||||
// in the NeoFS Sidechain.
|
||||
// NetworkConfiguration represents FrostFS network configuration stored
|
||||
// in the FrostFS Sidechain.
|
||||
type NetworkConfiguration struct {
|
||||
MaxObjectSize uint64
|
||||
|
||||
|
@ -261,7 +261,7 @@ type NetworkConfiguration struct {
|
|||
Raw []RawNetworkParameter
|
||||
}
|
||||
|
||||
// ReadNetworkConfiguration reads NetworkConfiguration from the NeoFS Sidechain.
|
||||
// ReadNetworkConfiguration reads NetworkConfiguration from the FrostFS Sidechain.
|
||||
func (c *Client) ReadNetworkConfiguration() (NetworkConfiguration, error) {
|
||||
var res NetworkConfiguration
|
||||
prm := client.TestInvokePrm{}
|
||||
|
@ -356,7 +356,7 @@ func bytesToBool(val []byte) bool {
|
|||
var ErrConfigNotFound = errors.New("config value not found")
|
||||
|
||||
// config performs the test invoke of get config value
|
||||
// method of NeoFS Netmap contract.
|
||||
// method of FrostFS Netmap contract.
|
||||
//
|
||||
// Returns ErrConfigNotFound if config key is not found in the contract.
|
||||
func (c *Client) config(key []byte, assert func(stackitem.Item) (interface{}, error)) (interface{}, error) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/TrueCloudLab/frostfs-node/pkg/morph/client"
|
||||
)
|
||||
|
||||
// Epoch receives number of current NeoFS epoch
|
||||
// Epoch receives number of current FrostFS epoch
|
||||
// through the Netmap contract call.
|
||||
func (c *Client) Epoch() (uint64, error) {
|
||||
prm := client.TestInvokePrm{}
|
||||
|
@ -30,7 +30,7 @@ func (c *Client) Epoch() (uint64, error) {
|
|||
return uint64(num), nil
|
||||
}
|
||||
|
||||
// LastEpochBlock receives block number of current NeoFS epoch
|
||||
// LastEpochBlock receives block number of current FrostFS epoch
|
||||
// through the Netmap contract call.
|
||||
func (c *Client) LastEpochBlock() (uint32, error) {
|
||||
prm := client.TestInvokePrm{}
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/TrueCloudLab/frostfs-node/pkg/morph/client"
|
||||
)
|
||||
|
||||
// NewEpoch updates NeoFS epoch number through
|
||||
// NewEpoch updates FrostFS epoch number through
|
||||
// Netmap contract call.
|
||||
func (c *Client) NewEpoch(epoch uint64) error {
|
||||
prm := client.InvokePrm{}
|
||||
|
|
|
@ -36,7 +36,7 @@ const (
|
|||
NNSReputationContractName = "reputation.frostfs"
|
||||
// NNSSubnetworkContractName is a name of the subnet contract in NNS.
|
||||
NNSSubnetworkContractName = "subnet.frostfs"
|
||||
// NNSGroupKeyName is a name for the NeoFS group key record in NNS.
|
||||
// NNSGroupKeyName is a name for the FrostFS group key record in NNS.
|
||||
NNSGroupKeyName = "group.frostfs"
|
||||
)
|
||||
|
||||
|
@ -193,7 +193,7 @@ func exists(c *rpcclient.WSClient, nnsHash util.Uint160, domain string) (bool, e
|
|||
return !available, nil
|
||||
}
|
||||
|
||||
// SetGroupSignerScope makes the default signer scope include all NeoFS contracts.
|
||||
// SetGroupSignerScope makes the default signer scope include all FrostFS contracts.
|
||||
// Should be called for side-chain client only.
|
||||
func (c *Client) SetGroupSignerScope() error {
|
||||
c.switchLock.RLock()
|
||||
|
@ -213,7 +213,7 @@ func (c *Client) SetGroupSignerScope() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// contractGroupKey returns public key designating NeoFS contract group.
|
||||
// contractGroupKey returns public key designating FrostFS contract group.
|
||||
func (c *Client) contractGroupKey() (*keys.PublicKey, error) {
|
||||
if gKey := c.cache.groupKey(); gKey != nil {
|
||||
return gKey, nil
|
||||
|
|
|
@ -569,7 +569,7 @@ func (c *Client) notaryCosigners(invokedByAlpha bool, ir []*keys.PublicKey, comm
|
|||
|
||||
multisigScript, err := sc.CreateMultiSigRedeemScript(m, ir)
|
||||
if err != nil {
|
||||
// wrap error as NeoFS-specific since the call is not related to any client
|
||||
// wrap error as FrostFS-specific since the call is not related to any client
|
||||
return nil, wrapFrostFSError(fmt.Errorf("can't create ir multisig redeem script: %w", err))
|
||||
}
|
||||
|
||||
|
@ -703,7 +703,7 @@ func (c *Client) notaryMultisigAccount(ir []*keys.PublicKey, committee, invokedB
|
|||
multisigAccount = wallet.NewAccountFromPrivateKey(c.acc.PrivateKey())
|
||||
err := multisigAccount.ConvertMultisig(m, ir)
|
||||
if err != nil {
|
||||
// wrap error as NeoFS-specific since the call is not related to any client
|
||||
// wrap error as FrostFS-specific since the call is not related to any client
|
||||
return nil, wrapFrostFSError(fmt.Errorf("can't convert account to inner ring multisig wallet: %w", err))
|
||||
}
|
||||
} else {
|
||||
|
@ -712,7 +712,7 @@ func (c *Client) notaryMultisigAccount(ir []*keys.PublicKey, committee, invokedB
|
|||
// inner ring multiaddress witness
|
||||
multisigAccount, err = notary.FakeMultisigAccount(m, ir)
|
||||
if err != nil {
|
||||
// wrap error as NeoFS-specific since the call is not related to any client
|
||||
// wrap error as FrostFS-specific since the call is not related to any client
|
||||
return nil, wrapFrostFSError(fmt.Errorf("can't make inner ring multisig wallet: %w", err))
|
||||
}
|
||||
}
|
||||
|
@ -766,7 +766,7 @@ func invocationParams(args ...interface{}) ([]sc.Parameter, error) {
|
|||
}
|
||||
|
||||
// sigCount returns the number of required signature.
|
||||
// For NeoFS Alphabet M is a 2/3+1 of it (like in dBFT).
|
||||
// For FrostFS Alphabet M is a 2/3+1 of it (like in dBFT).
|
||||
// If committee is true, returns M as N/2+1.
|
||||
func sigCount(ir []*keys.PublicKey, committee bool) int {
|
||||
if committee {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
// Client is a wrapper over StaticClient
|
||||
// which makes calls with the names and arguments
|
||||
// of the NeoFS reputation contract.
|
||||
// of the FrostFS reputation contract.
|
||||
//
|
||||
// Working client must be created via constructor New.
|
||||
// Using the Client that has been created with new(Client)
|
||||
|
|
|
@ -29,7 +29,7 @@ func (x *ManageAdminsPrm) SetClient() {
|
|||
x.client = true
|
||||
}
|
||||
|
||||
// SetSubnet sets identifier of the subnet in a binary NeoFS API protocol format.
|
||||
// SetSubnet sets identifier of the subnet in a binary FrostFS API protocol format.
|
||||
func (x *ManageAdminsPrm) SetSubnet(id []byte) {
|
||||
x.subnet = id
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ func (x *ManageAdminsPrm) SetAdmin(key []byte) {
|
|||
x.admin = key
|
||||
}
|
||||
|
||||
// SetGroup sets identifier of the client group in a binary NeoFS API protocol format.
|
||||
// SetGroup sets identifier of the client group in a binary FrostFS API protocol format.
|
||||
// Makes sense only for client admins (see ManageAdminsPrm.SetClient).
|
||||
func (x *ManageAdminsPrm) SetGroup(id []byte) {
|
||||
x.group = id
|
||||
|
@ -48,7 +48,7 @@ func (x *ManageAdminsPrm) SetGroup(id []byte) {
|
|||
// ManageAdminsRes groups the resulting values of node administer methods of Subnet contract.
|
||||
type ManageAdminsRes struct{}
|
||||
|
||||
// ManageAdmins manages admin list of the NeoFS subnet through Subnet contract calls.
|
||||
// ManageAdmins manages admin list of the FrostFS subnet through Subnet contract calls.
|
||||
func (x Client) ManageAdmins(prm ManageAdminsPrm) (*ManageAdminsPrm, error) {
|
||||
var method string
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ func (x *InitPrm) SetBaseClient(base *client.Client) {
|
|||
x.base = base
|
||||
}
|
||||
|
||||
// SetContractAddress sets address of Subnet contract in NeoFS sidechain.
|
||||
// SetContractAddress sets address of Subnet contract in FrostFS sidechain.
|
||||
func (x *InitPrm) SetContractAddress(addr util.Uint160) {
|
||||
x.addr = addr
|
||||
}
|
||||
|
|
|
@ -11,12 +11,12 @@ type UserAllowedPrm struct {
|
|||
args [2]interface{}
|
||||
}
|
||||
|
||||
// SetID sets identifier of the subnet in a binary NeoFS API protocol format.
|
||||
// SetID sets identifier of the subnet in a binary FrostFS API protocol format.
|
||||
func (x *UserAllowedPrm) SetID(id []byte) {
|
||||
x.args[0] = id
|
||||
}
|
||||
|
||||
// SetClient sets owner ID of the client that is being checked in a binary NeoFS API protocol format.
|
||||
// SetClient sets owner ID of the client that is being checked in a binary FrostFS API protocol format.
|
||||
func (x *UserAllowedPrm) SetClient(id []byte) {
|
||||
x.args[1] = id
|
||||
}
|
||||
|
@ -72,17 +72,17 @@ func (x *ManageClientsPrm) SetRemove() {
|
|||
x.rm = true
|
||||
}
|
||||
|
||||
// SetSubnet sets identifier of the subnet in a binary NeoFS API protocol format.
|
||||
// SetSubnet sets identifier of the subnet in a binary FrostFS API protocol format.
|
||||
func (x *ManageClientsPrm) SetSubnet(id []byte) {
|
||||
x.args[0] = id
|
||||
}
|
||||
|
||||
// SetGroup sets identifier of the client group in a binary NeoFS API protocol format.
|
||||
// SetGroup sets identifier of the client group in a binary FrostFS API protocol format.
|
||||
func (x *ManageClientsPrm) SetGroup(id []byte) {
|
||||
x.args[1] = id
|
||||
}
|
||||
|
||||
// SetClient sets client's user ID in a binary NeoFS API protocol format.
|
||||
// SetClient sets client's user ID in a binary FrostFS API protocol format.
|
||||
func (x *ManageClientsPrm) SetClient(id []byte) {
|
||||
x.args[2] = id
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ func (x *ManageClientsPrm) SetClient(id []byte) {
|
|||
// ManageClientsRes groups the resulting values of client management methods of Subnet contract.
|
||||
type ManageClientsRes struct{}
|
||||
|
||||
// ManageClients manages client list of the NeoFS subnet through Subnet contract calls.
|
||||
// ManageClients manages client list of the FrostFS subnet through Subnet contract calls.
|
||||
func (x Client) ManageClients(prm ManageClientsPrm) (*ManageClientsRes, error) {
|
||||
var method string
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ func (x *DeletePrm) SetTxHash(hash util.Uint256) {
|
|||
x.cliPrm.SetHash(hash)
|
||||
}
|
||||
|
||||
// SetID sets identifier of the subnet to be removed in a binary NeoFS API protocol format.
|
||||
// SetID sets identifier of the subnet to be removed in a binary FrostFS API protocol format.
|
||||
func (x *DeletePrm) SetID(id []byte) {
|
||||
x.args[0] = id
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ type GetPrm struct {
|
|||
args [1]interface{}
|
||||
}
|
||||
|
||||
// SetID sets identifier of the subnet to be read in a binary NeoFS API protocol format.
|
||||
// SetID sets identifier of the subnet to be read in a binary FrostFS API protocol format.
|
||||
func (x *GetPrm) SetID(id []byte) {
|
||||
x.args[0] = id
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ type GetRes struct {
|
|||
info []byte
|
||||
}
|
||||
|
||||
// Info returns information about the subnet in a binary format of NeoFS API protocol.
|
||||
// Info returns information about the subnet in a binary format of FrostFS API protocol.
|
||||
func (x GetRes) Info() []byte {
|
||||
return x.info
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ type NodeAllowedPrm struct {
|
|||
args [2]interface{}
|
||||
}
|
||||
|
||||
// SetID sets identifier of the subnet of the node in a binary NeoFS API protocol format.
|
||||
// SetID sets identifier of the subnet of the node in a binary FrostFS API protocol format.
|
||||
func (x *NodeAllowedPrm) SetID(id []byte) {
|
||||
x.args[0] = id
|
||||
}
|
||||
|
|
|
@ -18,17 +18,17 @@ func (x *PutPrm) SetTxHash(hash util.Uint256) {
|
|||
x.cliPrm.SetHash(hash)
|
||||
}
|
||||
|
||||
// SetID sets identifier of the created subnet in a binary NeoFS API protocol format.
|
||||
// SetID sets identifier of the created subnet in a binary FrostFS API protocol format.
|
||||
func (x *PutPrm) SetID(id []byte) {
|
||||
x.args[0] = id
|
||||
}
|
||||
|
||||
// SetOwner sets identifier of the subnet owner in a binary NeoFS API protocol format.
|
||||
// SetOwner sets identifier of the subnet owner in a binary FrostFS API protocol format.
|
||||
func (x *PutPrm) SetOwner(id []byte) {
|
||||
x.args[1] = id
|
||||
}
|
||||
|
||||
// SetInfo sets information about the created subnet in a binary NeoFS API protocol format.
|
||||
// SetInfo sets information about the created subnet in a binary FrostFS API protocol format.
|
||||
func (x *PutPrm) SetInfo(id []byte) {
|
||||
x.args[2] = id
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
)
|
||||
|
||||
// SetEACL represents structure of notification about
|
||||
// modified eACL table coming from NeoFS Container contract.
|
||||
// modified eACL table coming from FrostFS Container contract.
|
||||
type SetEACL struct {
|
||||
table []byte
|
||||
signature []byte
|
||||
|
@ -25,7 +25,7 @@ type SetEACL struct {
|
|||
// MorphEvent implements Neo:Morph Event interface.
|
||||
func (SetEACL) MorphEvent() {}
|
||||
|
||||
// Table returns returns eACL table in a binary NeoFS API format.
|
||||
// Table returns returns eACL table in a binary FrostFS API format.
|
||||
func (x SetEACL) Table() []byte {
|
||||
return x.table
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ func (p Put) NotaryRequest() *payload.P2PNotaryRequest {
|
|||
return p.notaryRequest
|
||||
}
|
||||
|
||||
// PutNamed represents notification event spawned by PutNamed method from Container contract of NeoFS Morph chain.
|
||||
// PutNamed represents notification event spawned by PutNamed method from Container contract of FrostFS Morph chain.
|
||||
type PutNamed struct {
|
||||
Put
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ type Put struct {
|
|||
// MorphEvent implements Neo:Morph Event interface.
|
||||
func (Put) MorphEvent() {}
|
||||
|
||||
// ID returns identifier of the creating subnet in a binary format of NeoFS API protocol.
|
||||
// ID returns identifier of the creating subnet in a binary format of FrostFS API protocol.
|
||||
func (x Put) ID() []byte {
|
||||
return x.id
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ func (x Put) Owner() []byte {
|
|||
return x.owner
|
||||
}
|
||||
|
||||
// Info returns information about the subnet in a binary format of NeoFS API protocol.
|
||||
// Info returns information about the subnet in a binary format of FrostFS API protocol.
|
||||
func (x Put) Info() []byte {
|
||||
return x.info
|
||||
}
|
||||
|
|
|
@ -205,7 +205,7 @@ func New(ctx context.Context, p *Params) (Subscriber, error) {
|
|||
// returns error if it is not reached that height after timeout duration.
|
||||
// This function is required to avoid connections to unsynced RPC nodes, because
|
||||
// they can produce events from the past that should not be processed by
|
||||
// NeoFS nodes.
|
||||
// FrostFS nodes.
|
||||
func awaitHeight(cli *client.Client, startFrom uint32) error {
|
||||
if startFrom == 0 {
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue