forked from TrueCloudLab/frostfs-node
[#203] morph: Mark depracated methods
Skip staticcheck for depracated methods. Will be fixed soon. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
9e2df4b7c7
commit
68a2f36636
4 changed files with 8 additions and 2 deletions
cmd/frostfs-adm/internal/modules/morph
pkg/morph/client
|
@ -286,6 +286,7 @@ func parseNNSResolveResult(res stackitem.Item) (util.Uint160, error) {
|
||||||
func nnsIsAvailable(c Client, nnsHash util.Uint160, name string) (bool, error) {
|
func nnsIsAvailable(c Client, nnsHash util.Uint160, name string) (bool, error) {
|
||||||
switch ct := c.(type) {
|
switch ct := c.(type) {
|
||||||
case *rpcclient.Client:
|
case *rpcclient.Client:
|
||||||
|
//lint:ignore SA1019 https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/202
|
||||||
return ct.NNSIsAvailable(nnsHash, name)
|
return ct.NNSIsAvailable(nnsHash, name)
|
||||||
default:
|
default:
|
||||||
b, err := unwrap.Bool(invokeFunction(c, nnsHash, "isAvailable", []any{name}, nil))
|
b, err := unwrap.Bool(invokeFunction(c, nnsHash, "isAvailable", []any{name}, nil))
|
||||||
|
|
|
@ -118,6 +118,7 @@ var errGetPriceInvalid = errors.New("`getRegisterPrice`: invalid response")
|
||||||
func (c *initializeContext) getCandidateRegisterPrice() (int64, error) {
|
func (c *initializeContext) getCandidateRegisterPrice() (int64, error) {
|
||||||
switch ct := c.Client.(type) {
|
switch ct := c.Client.(type) {
|
||||||
case *rpcclient.Client:
|
case *rpcclient.Client:
|
||||||
|
//lint:ignore SA1019 https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/202
|
||||||
return ct.GetCandidateRegisterPrice()
|
return ct.GetCandidateRegisterPrice()
|
||||||
default:
|
default:
|
||||||
neoHash := neo.Hash
|
neoHash := neo.Hash
|
||||||
|
|
|
@ -101,11 +101,11 @@ func generateTestData(t *testing.T, dir string, size int) {
|
||||||
cfg := config.Config{}
|
cfg := config.Config{}
|
||||||
cfg.ProtocolConfiguration.Magic = 12345
|
cfg.ProtocolConfiguration.Magic = 12345
|
||||||
cfg.ProtocolConfiguration.ValidatorsCount = size
|
cfg.ProtocolConfiguration.ValidatorsCount = size
|
||||||
cfg.ProtocolConfiguration.SecondsPerBlock = 1
|
cfg.ProtocolConfiguration.SecondsPerBlock = 1 //lint:ignore SA1019 https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/202
|
||||||
cfg.ProtocolConfiguration.StandbyCommittee = pubs // sorted by glagolic letters
|
cfg.ProtocolConfiguration.StandbyCommittee = pubs // sorted by glagolic letters
|
||||||
cfg.ProtocolConfiguration.P2PSigExtensions = true
|
cfg.ProtocolConfiguration.P2PSigExtensions = true
|
||||||
cfg.ProtocolConfiguration.VerifyTransactions = true
|
cfg.ProtocolConfiguration.VerifyTransactions = true
|
||||||
cfg.ProtocolConfiguration.VerifyBlocks = true
|
cfg.ProtocolConfiguration.VerifyBlocks = true //lint:ignore SA1019 https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/202
|
||||||
data, err := yaml.Marshal(cfg)
|
data, err := yaml.Marshal(cfg)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
|
|
@ -423,6 +423,7 @@ func (c *Client) NotarySignAndInvokeTX(mainTx *transaction.Transaction) error {
|
||||||
multiaddrAccount.PrivateKey().SignHashable(uint32(magicNumber), mainTx)...,
|
multiaddrAccount.PrivateKey().SignHashable(uint32(magicNumber), mainTx)...,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//lint:ignore SA1019 https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/202
|
||||||
resp, err := c.client.SignAndPushP2PNotaryRequest(mainTx,
|
resp, err := c.client.SignAndPushP2PNotaryRequest(mainTx,
|
||||||
[]byte{byte(opcode.RET)},
|
[]byte{byte(opcode.RET)},
|
||||||
-1,
|
-1,
|
||||||
|
@ -518,6 +519,7 @@ func (c *Client) notaryInvoke(committee, invokedByAlpha bool, contract util.Uint
|
||||||
}
|
}
|
||||||
|
|
||||||
// calculate notary fee
|
// calculate notary fee
|
||||||
|
//lint:ignore SA1019 https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/202
|
||||||
notaryFee, err := c.client.CalculateNotaryFee(u8n)
|
notaryFee, err := c.client.CalculateNotaryFee(u8n)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -525,6 +527,7 @@ func (c *Client) notaryInvoke(committee, invokedByAlpha bool, contract util.Uint
|
||||||
|
|
||||||
// add network fee for cosigners
|
// add network fee for cosigners
|
||||||
//nolint:staticcheck // waits for neo-go v0.99.3 with notary actors
|
//nolint:staticcheck // waits for neo-go v0.99.3 with notary actors
|
||||||
|
//lint:ignore SA1019 https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/202
|
||||||
err = c.client.AddNetworkFee(
|
err = c.client.AddNetworkFee(
|
||||||
mainTx,
|
mainTx,
|
||||||
notaryFee,
|
notaryFee,
|
||||||
|
@ -537,6 +540,7 @@ func (c *Client) notaryInvoke(committee, invokedByAlpha bool, contract util.Uint
|
||||||
// define witnesses
|
// define witnesses
|
||||||
mainTx.Scripts = c.notaryWitnesses(invokedByAlpha, multiaddrAccount, mainTx)
|
mainTx.Scripts = c.notaryWitnesses(invokedByAlpha, multiaddrAccount, mainTx)
|
||||||
|
|
||||||
|
//lint:ignore SA1019 https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/202
|
||||||
resp, err := c.client.SignAndPushP2PNotaryRequest(mainTx,
|
resp, err := c.client.SignAndPushP2PNotaryRequest(mainTx,
|
||||||
[]byte{byte(opcode.RET)},
|
[]byte{byte(opcode.RET)},
|
||||||
-1,
|
-1,
|
||||||
|
|
Loading…
Reference in a new issue