Explorar el Código

entrypoint: prevent commitment from being serialized twice

oars hace 8 meses
padre
commit
762ad4d8fd
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/entrypoint.rs

+ 1 - 1
src/entrypoint.rs

@@ -176,7 +176,7 @@ fn process_instruction(cid: ContractId, ix: &[u8]) -> ContractResult {
     // `process_update()` will be prefixed with the first byte from the payload
     // `process_update()` will be prefixed with the first byte from the payload
     // fed to this function so there is no need to add it ourself. We just
     // fed to this function so there is no need to add it ourself. We just
     // return the payload we want to work with.
     // return the payload we want to work with.
-    wasm::util::set_return_data(&serialize(&commitment))
+    wasm::util::set_return_data(&commitment)
 }
 }
 
 
 /// Contract apply function
 /// Contract apply function