Don't panic if parameter can not be converted between node and native runtime (#1659)

* Don't panic if parameter can not be converted between node and native runtime

* FIxes after merge

* Use correct copyright year
This commit is contained in:
Bastian Köcher
2019-02-02 14:13:50 +01:00
committed by Gav Wood
parent 4983f113e6
commit ef4dc12a5d
21 changed files with 216 additions and 67 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ pub trait ApiExt<Block: BlockT> {
pub trait CallRuntimeAt<Block: BlockT> {
/// Calls the given api function with the given encoded arguments at the given block
/// and returns the encoded result.
fn call_api_at<R: Encode + Decode + PartialEq, NC: FnOnce() -> R + UnwindSafe>(
fn call_api_at<R: Encode + Decode + PartialEq, NC: FnOnce() -> result::Result<R, &'static str> + UnwindSafe>(
&self,
at: &BlockId<Block>,
function: &'static str,