mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 12:51:02 +00:00
Switch parachain interface to new runtime_interface macro (#665)
* Make use of `runtime_interface` for parachain externalities This also changes the encoding of the `ValidationResult` return value to match the default encoding used in Substrate. * Fix compilation for web * Update `Cargo.lock` * Include feedback * Move proc macro * Update parachain/src/lib.rs Co-Authored-By: Robert Habermeier <rphmeier@gmail.com> Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
This commit is contained in:
@@ -18,8 +18,7 @@
|
||||
|
||||
use polkadot_parachain as parachain;
|
||||
|
||||
use crate::parachain::{IncomingMessage, ValidationParams};
|
||||
use crate::DummyExt;
|
||||
use crate::{DummyExt, parachain::{IncomingMessage, ValidationParams}};
|
||||
use codec::{Decode, Encode};
|
||||
|
||||
/// Head data for this parachain.
|
||||
@@ -78,7 +77,7 @@ pub fn execute_good_on_parent() {
|
||||
block_data: block_data.encode(),
|
||||
ingress: Vec::new(),
|
||||
},
|
||||
&mut DummyExt,
|
||||
DummyExt,
|
||||
parachain::wasm_executor::ExecutionMode::RemoteTest,
|
||||
).unwrap();
|
||||
|
||||
@@ -114,7 +113,7 @@ fn execute_good_chain_on_parent() {
|
||||
block_data: block_data.encode(),
|
||||
ingress: Vec::new(),
|
||||
},
|
||||
&mut DummyExt,
|
||||
DummyExt,
|
||||
parachain::wasm_executor::ExecutionMode::RemoteTest,
|
||||
).unwrap();
|
||||
|
||||
@@ -150,7 +149,7 @@ fn execute_bad_on_parent() {
|
||||
block_data: block_data.encode(),
|
||||
ingress: Vec::new(),
|
||||
},
|
||||
&mut DummyExt,
|
||||
DummyExt,
|
||||
parachain::wasm_executor::ExecutionMode::RemoteTest,
|
||||
).unwrap_err();
|
||||
}
|
||||
@@ -182,7 +181,7 @@ fn processes_messages() {
|
||||
IncomingMessage { source: 3.into(), data: (AddMessage { amount: 256 }).encode() },
|
||||
],
|
||||
},
|
||||
&mut DummyExt,
|
||||
DummyExt,
|
||||
parachain::wasm_executor::ExecutionMode::RemoteTest,
|
||||
).unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user