message: Fix test under `use-as-wasm`
  Turns out AssemblyScript empty function does actually something which is
  a single "nop" instruction.
diff: @@ -17,7 +17,26 @@ use casper_execution_engine::{
  };
  use casper_types::{contracts::DEFAULT_ENTRY_POINT_NAME, runtime_args, RuntimeArgs};
  -const DO_NOTHING_CONTRACT: &str = "do_nothing.wasm";
  +/// Creates minimal session code that does nothing
  +fn make_minimal_do_nothing() -> Vec<u8> {
  + let module = builder::module()
  + .function()
  + // A signature with 0 params and no return type
  + .signature()
  + .build()
  + .body()
  + .build()
  + .build()
  + // Export above function
  + .export()
  + .field(DEFAULT_ENTRY_POINT_NAME)
  + .build()
  + // Memory section is mandatory
  + .memory()
  + .build()
  + .build();
  + parity_wasm::serialize(module).expect("should serialize")
  +}
  /// Prepare malicious payload with amount of opcodes that could potentially overflow injected gas
  /// counter.
  @@ -163,20 +182,34 @@ fn should_correctly_measure_gas_for_opcodes() {
  let session_bytes = make_session_code_with(instructions);
  - let exec_request = ExecuteRequestBuilder::standard(
  - *DEFAULT_ACCOUNT_ADDR,
  - DO_NOTHING_CONTRACT,
  - RuntimeArgs::new(),
  - )
  + let exec_request = {
  + // NOTE: We use computed "do nothing" WASM module because it turns out "do_nothing" in
  + // AssemblyScript actually does "nop" which really "does something": (func (;10;)
  + // (type 4) nop)
  +
  + let do_nothing_bytes = make_minimal_do_nothing();
  +
  + let deploy_item = DeployItemBuilder::new()
  + .with_address(*DEFAULT_ACCOUNT_ADDR)
  + .with_session_bytes(do_nothing_bytes, RuntimeArgs::default())
  + .with_empty_payment_bytes(runtime_args! {
  + ARG_AMOUNT => *DEFAULT_PAYMENT
  + })
  + .with_authorization_keys(&[*DEFAULT_ACCOUNT_ADDR])
  + .with_deploy_hash([43; 32])
  .build();
  + ExecuteRequestBuilder::from_deploy_item(deploy_item).build()
  + };
  let mut builder = InMemoryWasmTestBuilder::default();
  builder.run_genesis(&DEFAULT_RUN_GENESIS_REQUEST);
  - builder.exec(exec_request).commit().expect_success();
  -
  - let payment_cost = builder.last_exec_gas_cost();
  + let payment_cost = {
  + let mut forked_builder = builder.clone();
  + forked_builder.exec(exec_request).commit().expect_success();
  + forked_builder.last_exec_gas_cost()
  + };
  let exec_request = {
  let deploy_item = DeployItemBuilder::new()
  