[#404] innerring: Use notary invocations in inner ring

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-02-25 19:53:00 +03:00 committed by Alex Vanin
parent 83980ccb85
commit 4b10e82685
5 changed files with 12 additions and 12 deletions

View file

@ -32,5 +32,5 @@ func AlphabetVote(cli *client.Client, con util.Uint160, epoch uint64, keys []key
binaryKeys = append(binaryKeys, keys[i].Bytes())
}
return cli.Invoke(con, extraFee, voteMethod, int64(epoch), binaryKeys)
return cli.NotaryInvoke(con, voteMethod, int64(epoch), binaryKeys)
}

View file

@ -37,7 +37,7 @@ func Mint(cli *client.Client, con util.Uint160, p *MintBurnParams) error {
return client.ErrNilClient
}
return cli.Invoke(con, extraFee, mintMethod,
return cli.NotaryInvoke(con, mintMethod,
p.ScriptHash,
p.Amount,
p.Comment,
@ -50,7 +50,7 @@ func Burn(cli *client.Client, con util.Uint160, p *MintBurnParams) error {
return client.ErrNilClient
}
return cli.Invoke(con, extraFee, burnMethod,
return cli.NotaryInvoke(con, burnMethod,
p.ScriptHash,
p.Amount,
p.Comment,
@ -63,7 +63,7 @@ func LockAsset(cli *client.Client, con util.Uint160, p *LockParams) error {
return client.ErrNilClient
}
return cli.Invoke(con, extraFee, lockMethod,
return cli.NotaryInvoke(con, lockMethod,
p.ID,
p.User.BytesBE(),
p.LockAccount.BytesBE(),

View file

@ -32,7 +32,7 @@ func RegisterContainer(cli *client.Client, con util.Uint160, p *ContainerParams)
return client.ErrNilClient
}
return cli.Invoke(con, 3*extraFee, putContainerMethod,
return cli.NotaryInvoke(con, putContainerMethod,
p.Container,
p.Signature,
p.Key.Bytes(),
@ -45,7 +45,7 @@ func RemoveContainer(cli *client.Client, con util.Uint160, p *RemoveContainerPar
return client.ErrNilClient
}
return cli.Invoke(con, extraFee, deleteContainerMethod,
return cli.NotaryInvoke(con, deleteContainerMethod,
p.ContainerID,
p.Signature,
)

View file

@ -57,7 +57,7 @@ func SetNewEpoch(cli *client.Client, con util.Uint160, epoch uint64) error {
return client.ErrNilClient
}
return cli.Invoke(con, extraFee, setNewEpochMethod, int64(epoch))
return cli.NotaryInvoke(con, setNewEpochMethod, int64(epoch))
}
// ApprovePeer invokes addPeer method.
@ -66,7 +66,7 @@ func ApprovePeer(cli *client.Client, con util.Uint160, peer []byte) error {
return client.ErrNilClient
}
return cli.Invoke(con, extraFee, approvePeerMethod, peer)
return cli.NotaryInvoke(con, approvePeerMethod, peer)
}
// UpdatePeerState invokes addPeer method.
@ -75,7 +75,7 @@ func UpdatePeerState(cli *client.Client, con util.Uint160, args *UpdatePeerArgs)
return client.ErrNilClient
}
return cli.Invoke(con, extraFee, updatePeerStateMethod,
return cli.NotaryInvoke(con, updatePeerStateMethod,
int64(args.Status.ToV2()),
args.Key.Bytes(),
)
@ -87,7 +87,7 @@ func SetConfig(cli *client.Client, con util.Uint160, args *SetConfigArgs) error
return client.ErrNilClient
}
return cli.Invoke(con, extraFee, setConfigMethod,
return cli.NotaryInvoke(con, setConfigMethod,
args.ID,
args.Key,
args.Value,
@ -105,7 +105,7 @@ func UpdateInnerRing(cli *client.Client, con util.Uint160, list []*keys.PublicKe
rawKeys = append(rawKeys, list[i].Bytes())
}
return cli.Invoke(con, extraFee, updateInnerRingMethod, rawKeys)
return cli.NotaryInvoke(con, updateInnerRingMethod, rawKeys)
}
// NetmapSnapshot returns current netmap node infos.

View file

@ -207,7 +207,7 @@ func (s settlementDeps) transfer(sender, recipient *owner.ID, amount *big.Int, d
return
}
if err := s.balanceClient.TransferX(balanceClient.TransferPrm{
if err := s.balanceClient.TransferXNotary(balanceClient.TransferPrm{
Amount: amount.Int64(),
From: sender,
To: recipient,