Skip to content

Commit 00c80b0

Browse files
agryaznovark0f
authored andcommitted
rename call_runtime() returned error (paritytech#13412)
1 parent 7c97b2e commit 00c80b0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

frame/contracts/src/wasm/runtime.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ pub enum ReturnCode {
115115
/// The contract that was called is no contract (a plain account).
116116
NotCallable = 8,
117117
/// The call dispatched by `seal_call_runtime` was executed but returned an error.
118-
CallRuntimeReturnedError = 10,
118+
CallRuntimeFailed = 10,
119119
/// ECDSA pubkey recovery failed (most probably wrong recovery id or signature), or
120120
/// ECDSA compressed pubkey conversion into Ethereum address failed (most probably
121121
/// wrong pubkey provided).
@@ -2404,21 +2404,21 @@ pub mod env {
24042404
///
24052405
/// # Parameters
24062406
///
2407-
/// - `input_ptr`: the pointer into the linear memory where the input data is placed.
2408-
/// - `input_len`: the length of the input data in bytes.
2407+
/// - `call_ptr`: the pointer into the linear memory where the input data is placed.
2408+
/// - `call_len`: the length of the input data in bytes.
24092409
///
24102410
/// # Return Value
24112411
///
24122412
/// Returns `ReturnCode::Success` when the dispatchable was succesfully executed and
24132413
/// returned `Ok`. When the dispatchable was exeuted but returned an error
2414-
/// `ReturnCode::CallRuntimeReturnedError` is returned. The full error is not
2414+
/// `ReturnCode::CallRuntimeFailed` is returned. The full error is not
24152415
/// provided because it is not guaranteed to be stable.
24162416
///
24172417
/// # Comparison with `ChainExtension`
24182418
///
24192419
/// Just as a chain extension this API allows the runtime to extend the functionality
2420-
/// of contracts. While making use of this function is generelly easier it cannot be
2421-
/// used in call cases. Consider writing a chain extension if you need to do perform
2420+
/// of contracts. While making use of this function is generally easier it cannot be
2421+
/// used in all cases. Consider writing a chain extension if you need to do perform
24222422
/// one of the following tasks:
24232423
///
24242424
/// - Return data.
@@ -2444,7 +2444,7 @@ pub mod env {
24442444
ctx.adjust_gas(charged, RuntimeCosts::CallRuntime(actual_weight));
24452445
match result {
24462446
Ok(_) => Ok(ReturnCode::Success),
2447-
Err(_) => Ok(ReturnCode::CallRuntimeReturnedError),
2447+
Err(_) => Ok(ReturnCode::CallRuntimeFailed),
24482448
}
24492449
}
24502450

0 commit comments

Comments
 (0)