Skip to content

Commit

Permalink
more lints
Browse files Browse the repository at this point in the history
  • Loading branch information
wlawt committed Apr 25, 2024
1 parent 0715c0c commit 06704c2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cli/spam.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 06704c2

Please sign in to comment.