diff --git a/api/lib_test.go b/api/lib_test.go index 79b6b4ac..d4ce49a8 100644 --- a/api/lib_test.go +++ b/api/lib_test.go @@ -319,7 +319,7 @@ func TestInstantiate(t *testing.T) { res, cost, err := Instantiate(cache, checksum, env, info, msg, &igasMeter, store, api, &querier, TESTING_GAS_LIMIT, TESTING_PRINT_DEBUG) require.NoError(t, err) requireOkResponse(t, res, 0) - assert.Equal(t, uint64(0x13c200d90), cost) + assert.Equal(t, uint64(0x1302be720), cost) var result types.ContractResult err = json.Unmarshal(res, &result) @@ -350,7 +350,7 @@ func TestExecute(t *testing.T) { diff := time.Now().Sub(start) require.NoError(t, err) requireOkResponse(t, res, 0) - assert.Equal(t, uint64(0x13c200d90), cost) + assert.Equal(t, uint64(0x1302be720), cost) t.Logf("Time (%d gas): %s\n", cost, diff) // execute with the same store @@ -363,7 +363,7 @@ func TestExecute(t *testing.T) { res, cost, err = Execute(cache, checksum, env, info, []byte(`{"release":{}}`), &igasMeter2, store, api, &querier, TESTING_GAS_LIMIT, TESTING_PRINT_DEBUG) diff = time.Now().Sub(start) require.NoError(t, err) - assert.Equal(t, uint64(0x2373980d0), cost) + assert.Equal(t, uint64(0x22beeb9c0), cost) t.Logf("Time (%d gas): %s\n", cost, diff) // make sure it read the balance properly and we got 250 atoms @@ -414,7 +414,7 @@ func TestExecuteCpuLoop(t *testing.T) { diff := time.Now().Sub(start) require.NoError(t, err) requireOkResponse(t, res, 0) - assert.Equal(t, uint64(0x13c200d90), cost) + assert.Equal(t, uint64(0x1302be720), cost) t.Logf("Time (%d gas): %s\n", cost, diff) // execute a cpu loop @@ -565,7 +565,7 @@ func TestMultipleInstances(t *testing.T) { require.NoError(t, err) requireOkResponse(t, res, 0) // we now count wasm gas charges and db writes - assert.Equal(t, uint64(0x139eab700), cost) + assert.Equal(t, uint64(0x12df69090), cost) // instance2 controlled by mary gasMeter2 := NewMockGasMeter(TESTING_GAS_LIMIT) @@ -576,14 +576,14 @@ func TestMultipleInstances(t *testing.T) { res, cost, err = Instantiate(cache, checksum, env, info, msg, &igasMeter2, store2, api, &querier, TESTING_GAS_LIMIT, TESTING_PRINT_DEBUG) require.NoError(t, err) requireOkResponse(t, res, 0) - assert.Equal(t, uint64(0x13b2fba20), cost) + assert.Equal(t, uint64(0x12f3b93b0), cost) // fail to execute store1 with mary - resp := exec(t, cache, checksum, "mary", store1, api, querier, 0x126df84b0) + resp := exec(t, cache, checksum, "mary", store1, api, querier, 0x11aeb5e40) require.Equal(t, "Unauthorized", resp.Err) // succeed to execute store1 with fred - resp = exec(t, cache, checksum, "fred", store1, api, querier, 0x236300010) + resp = exec(t, cache, checksum, "fred", store1, api, querier, 0x22ae53900) require.Equal(t, "", resp.Err) require.Equal(t, 1, len(resp.Ok.Messages)) attributes := resp.Ok.Attributes @@ -592,7 +592,7 @@ func TestMultipleInstances(t *testing.T) { require.Equal(t, "bob", attributes[1].Value) // succeed to execute store2 with mary - resp = exec(t, cache, checksum, "mary", store2, api, querier, 0x236b4c070) + resp = exec(t, cache, checksum, "mary", store2, api, querier, 0x22b69f960) require.Equal(t, "", resp.Err) require.Equal(t, 1, len(resp.Ok.Messages)) attributes = resp.Ok.Attributes