From 06704c201c560f094e768569a483f86cc21fcbf9 Mon Sep 17 00:00:00 2001 From: William Law Date: Wed, 24 Apr 2024 20:41:06 -0400 Subject: [PATCH] more lints --- cli/spam.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/spam.go b/cli/spam.go index 16978d538f..41a5b3a1b9 100644 --- a/cli/spam.go +++ b/cli/spam.go @@ -52,7 +52,7 @@ func (h *Handler) Spam( createAccount func() (*PrivateKey, error), lookupBalance func(int, string) (uint64, error), getParser func(context.Context, ids.ID) (chain.Parser, error), - getTransfer func(codec.Address, uint64) chain.Action, + getTransfer func(codec.Address, uint64) []chain.Action, submitDummy func(*rpc.JSONRPCClient, *PrivateKey) func(context.Context, uint64) error, ) error { ctx := context.Background() @@ -110,8 +110,8 @@ func (h *Handler) Spam( if err != nil { return err } - action := getTransfer(keys[0].Address, 0) - maxUnits, err := chain.EstimateMaxUnits(parser.Rules(time.Now().UnixMilli()), action, factory) + actions := getTransfer(keys[0].Address, 0) + maxUnits, err := chain.EstimateMaxUnits(parser.Rules(time.Now().UnixMilli()), actions[0], factory) if err != nil { return err } @@ -307,7 +307,7 @@ func (h *Handler) Spam( } v := selected[recipient] + 1 selected[recipient] = v - action := getTransfer(recipient, uint64(v)) + actions := getTransfer(recipient, uint64(v)) fee, err := fees.MulSum(unitPrices, maxUnits) if err != nil { utils.Outf("{{orange}}failed to estimate max fee:{{/}} %v\n", err) @@ -316,7 +316,7 @@ func (h *Handler) Spam( if maxFee != nil { fee = *maxFee } - _, tx, err := issuer.c.GenerateTransactionManual(parser, action, factory, fee, tm) + _, tx, err := issuer.c.GenerateTransactionManual(parser, actions, factory, fee, tm) if err != nil { utils.Outf("{{orange}}failed to generate tx:{{/}} %v\n", err) continue