fix var name for post_upward_message (#474)

Signed-off-by: yjhmelody <465402634@qq.com>
This commit is contained in:
yjh
2019-10-11 19:25:36 +08:00
committed by Gavin Wood
parent 0efa39ce06
commit 78fc9edd5f
+3 -3
View File
@@ -45,7 +45,7 @@ mod ids {
pub const POST_MESSAGE: usize = 1; pub const POST_MESSAGE: usize = 1;
/// Post a message to this parachain's relay chain. /// Post a message to this parachain's relay chain.
pub const POST_UPWARDS_MESSAGE: usize = 2; pub const POST_UPWARD_MESSAGE: usize = 2;
} }
/// WASM code execution mode. /// WASM code execution mode.
@@ -155,7 +155,7 @@ impl ModuleImportResolver for Resolver {
} }
} }
"ext_upwards_post_message" => { "ext_upwards_post_message" => {
let index = ids::POST_UPWARDS_MESSAGE; let index = ids::POST_UPWARD_MESSAGE;
let (params, ret_ty): (&[ValueType], Option<ValueType>) = let (params, ret_ty): (&[ValueType], Option<ValueType>) =
(&[ValueType::I32, ValueType::I32], None); (&[ValueType::I32, ValueType::I32], None);
@@ -268,7 +268,7 @@ impl<'a, E: 'a + Externalities> Externals for ValidationExternals<'a, E> {
) -> Result<Option<RuntimeValue>, Trap> { ) -> Result<Option<RuntimeValue>, Trap> {
match index { match index {
ids::POST_MESSAGE => self.ext_post_message(args).map(|_| None), ids::POST_MESSAGE => self.ext_post_message(args).map(|_| None),
ids::POST_UPWARDS_MESSAGE => self.ext_post_upward_message(args).map(|_| None), ids::POST_UPWARD_MESSAGE => self.ext_post_upward_message(args).map(|_| None),
_ => panic!("no externality at given index"), _ => panic!("no externality at given index"),
} }
} }