forked from TrueCloudLab/frostfs-node
[#746] morph/client: Don't cache GAS contract address on NeoFS-side
Caching is performed inside `GetNativeContractHash` method of neo-go client, so the additional cache level is redundant. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
0502abc3e0
commit
81722c373b
4 changed files with 20 additions and 13 deletions
|
@ -151,10 +151,15 @@ func (c *Client) DepositNotary(amount fixedn.Fixed8, delta uint32) (res util.Uin
|
|||
return util.Uint256{}, fmt.Errorf("can't get blockchain height: %w", err)
|
||||
}
|
||||
|
||||
gas, err := c.client.GetNativeContractHash(nativenames.Gas)
|
||||
if err != nil {
|
||||
return util.Uint256{}, err
|
||||
}
|
||||
|
||||
txHash, err := c.client.TransferNEP17(
|
||||
c.acc,
|
||||
c.notary.notary,
|
||||
c.gas,
|
||||
gas,
|
||||
int64(amount),
|
||||
0,
|
||||
[]interface{}{c.acc.PrivateKey().GetScriptHash(), int64(bc + delta)},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue