Skip to content

Commit

Permalink
pass only context ptr as i32
Browse files Browse the repository at this point in the history
  • Loading branch information
iFrostizz committed May 1, 2024
1 parent a26bb42 commit 7e90e81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions x/programs/cmd/simulator/cmd/program.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ func programExecuteFunc(
) (ids.ID, []int64, uint64, error) {
// simulate create program transaction
programTxID, err := generateRandomID()

if err != nil {
return ids.Empty, nil, 0, err
}
Expand Down
4 changes: 2 additions & 2 deletions x/programs/runtime/runtime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ func TestCallParams(t *testing.T) {
(module
(memory 1) ;; 1 pages
;; first argument is always the pointer to the context
(func $add (param i32 i32 i32) (result i32)
(i32.add local.get 1 local.get 2)
(func $add (param i32 i64 i64) (result i64)
(i64.add local.get 1 local.get 2)
)
(func $alloc (param i32) (result i32)
i32.const 0
Expand Down

0 comments on commit 7e90e81

Please sign in to comment.