Skip to content

Commit

Permalink
rename to t.Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
wlawt committed Apr 22, 2024
1 parent 7b4d77c commit 66baa94
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions chain/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import (
"github.com/ava-labs/hypersdk/utils"
)

const defaultStateKeySize = 4

var (
_ emap.Item = (*Transaction)(nil)
_ mempool.Item = (*Transaction)(nil)
Expand Down Expand Up @@ -136,7 +134,7 @@ func (t *Transaction) StateKeys(sm StateManager) (state.Keys, error) {
stateKeys := make(state.Keys)

sponsorKeys := sm.SponsorStateKeys(t.Auth.Sponsor())
for idx, action := range t.Action {
for idx, action := range t.Actions {
// Verify the formatting of state keys passed by the controller
actionKeys := action.StateKeys(t.Auth.Actor(), action.GetActionID(idx, t.id))

Check failure on line 139 in chain/transaction.go

View workflow job for this annotation

GitHub Actions / hypersdk-lint

cannot use idx (variable of type int) as uint8 value in argument to action.GetActionID

Check failure on line 139 in chain/transaction.go

View workflow job for this annotation

GitHub Actions / hypersdk-unit-tests

cannot use idx (variable of type int) as uint8 value in argument to action.GetActionID
for _, m := range []state.Keys{actionKeys, sponsorKeys} {
Expand Down Expand Up @@ -555,7 +553,7 @@ func (t *Transaction) Marshal(p *codec.Packer) error {
}

// TODO: do I need all this within the loop?
for idx, action := range t.Action {
for idx, action := range t.Actions {
actionID := action.GetActionID(idx, t.id)
authID := t.Auth.GetTypeID()
t.Base.Marshal(p)
Expand Down

0 comments on commit 66baa94

Please sign in to comment.