Skip to content

Commit

Permalink
fix x/programs
Browse files Browse the repository at this point in the history
  • Loading branch information
wlawt committed Apr 24, 2024
1 parent 276b3da commit 32f4422
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions x/programs/cmd/simulator/cmd/program.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func programCreateFunc(ctx context.Context, db *state.SimpleMutable, path string
}

// execute the action
success, _, output, _, err := programCreateAction.Execute(ctx, nil, db, 0, codec.EmptyAddress, programID, false)
success, _, output, err := programCreateAction.Execute(ctx, nil, db, 0, codec.EmptyAddress, programID)
if output != nil {
fmt.Println(string(output))
}
Expand Down Expand Up @@ -157,7 +157,7 @@ func programExecuteFunc(
}

// execute the action
success, _, resp, _, err := programExecuteAction.Execute(ctx, nil, db, 0, codec.EmptyAddress, programTxID, false)
success, _, resp, err := programExecuteAction.Execute(ctx, nil, db, 0, codec.EmptyAddress, programTxID)

if !success {
return ids.Empty, nil, 0, fmt.Errorf("program execution failed: %s", string(resp))
Expand Down
1 change: 0 additions & 1 deletion x/programs/cmd/simulator/vm/actions/program_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ func (t *ProgramCreate) Execute(
_ int64,
_ codec.Address,
id ids.ID,
_ bool,
) (bool, uint64, []byte, error) {
if len(t.Program) == 0 {
return false, 1, OutputValueZero, nil
Expand Down
1 change: 0 additions & 1 deletion x/programs/cmd/simulator/vm/actions/program_execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ func (t *ProgramExecute) Execute(
_ int64,
actor codec.Address,
_ ids.ID,
_ bool,
) (success bool, computeUnits uint64, output []byte, err error) {
if len(t.Function) == 0 {
return false, 1, OutputValueZero, nil
Expand Down
1 change: 0 additions & 1 deletion x/programs/cmd/simulator/vm/storage/state_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package storage
import (
"context"

"github.com/ava-labs/avalanchego/ids"
"github.com/ava-labs/hypersdk/codec"
"github.com/ava-labs/hypersdk/state"
)
Expand Down

0 comments on commit 32f4422

Please sign in to comment.