Skip to content

Commit

Permalink
Document error for non-existing code hash
Browse files Browse the repository at this point in the history
  • Loading branch information
yarikbratashchuk committed Jan 19, 2022
1 parent 0a8b745 commit e038fe2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions frame/contracts/src/wasm/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,7 @@ define_env!(Env, <E: Ext>,
//
// - requested buffer is not within the bounds of the sandbox memory.
// - the buffer contents cannot be decoded as the required type.
// - code for specified hash does not exist
[__unstable__] seal_set_code_hash(ctx, code_hash_ptr: u32) -> ReturnCode => {
ctx.charge_gas(RuntimeCosts::SetCodeHash)?;
let code_hash: CodeHash<<E as Ext>::T> = ctx.read_sandbox_memory_as(code_hash_ptr)?;
Expand Down

0 comments on commit e038fe2

Please sign in to comment.