[#486] innerring: Use fee provider interface in invoke package

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-04-29 16:39:09 +03:00 committed by Alex Vanin
parent 1f3bb33db8
commit 91a1896b8b
7 changed files with 135 additions and 24 deletions

View file

@ -22,10 +22,14 @@ func AlphabetEmit(cli *client.Client, con util.Uint160) error {
}
// AlphabetVote invokes vote method on alphabet contract.
func AlphabetVote(cli *client.Client, con util.Uint160, epoch uint64, keys keys.PublicKeys) error {
func AlphabetVote(cli *client.Client, con util.Uint160, fee SideFeeProvider, epoch uint64, keys keys.PublicKeys) error {
if cli == nil {
return client.ErrNilClient
}
if !cli.NotaryEnabled() {
return cli.Invoke(con, fee.SideChainFee(), voteMethod, int64(epoch), keys)
}
return cli.NotaryInvoke(con, voteMethod, int64(epoch), keys)
}