add core_call method to node service

This commit is contained in:
vms 2020-06-12 02:04:52 +03:00
parent 9da7cc0957
commit abf1d48482
2 changed files with 18 additions and 0 deletions

View File

@ -94,6 +94,17 @@ impl crate::node_wasm_service::NodeWasmService for IpfsNode {
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 {
let mut modules = Vec::with_capacity(self.module_names.len());

View File

@ -27,5 +27,12 @@ pub trait NodeWasmService {
args: &[IValue],
) -> 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;
}