mirror of
https://github.com/fluencelabs/marine.git
synced 2024-12-12 14:55:32 +00:00
add core_call method to node service
This commit is contained in:
parent
9da7cc0957
commit
abf1d48482
@ -94,6 +94,17 @@ impl crate::node_wasm_service::NodeWasmService for IpfsNode {
|
|||||||
Ok(call_result)
|
Ok(call_result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn core_call(
|
||||||
|
&mut self,
|
||||||
|
module_name: &str,
|
||||||
|
func_name: &str,
|
||||||
|
args: &[IValue],
|
||||||
|
) -> Result<Vec<IValue>, NodeError> {
|
||||||
|
self.process
|
||||||
|
.call(module_name, func_name, args)
|
||||||
|
.map_err(Into::into)
|
||||||
|
}
|
||||||
|
|
||||||
fn get_interface(&self) -> NodePublicInterface {
|
fn get_interface(&self) -> NodePublicInterface {
|
||||||
let mut modules = Vec::with_capacity(self.module_names.len());
|
let mut modules = Vec::with_capacity(self.module_names.len());
|
||||||
|
|
||||||
|
@ -27,5 +27,12 @@ pub trait NodeWasmService {
|
|||||||
args: &[IValue],
|
args: &[IValue],
|
||||||
) -> Result<Vec<IValue>, NodeError>;
|
) -> Result<Vec<IValue>, NodeError>;
|
||||||
|
|
||||||
|
fn core_call(
|
||||||
|
&mut self,
|
||||||
|
module_name: &str,
|
||||||
|
func_name: &str,
|
||||||
|
args: &[IValue],
|
||||||
|
) -> Result<Vec<IValue>, NodeError>;
|
||||||
|
|
||||||
fn get_interface(&self) -> NodePublicInterface;
|
fn get_interface(&self) -> NodePublicInterface;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user