Conversation
040f45d to
4dee84b
Compare
demo/runtime/src/lib.rs
Outdated
| pub type Executive = executive::Executive<Runtime, Block, Balances, Balances, | ||
| (((((), Council), Democracy), Staking), Session)>; | ||
|
|
||
| impl_json_metadata!(for Runtime with modules |
There was a problem hiding this comment.
style: "all-or-nothing" indentation with close-paren on its own line.
substrate/client/src/client.rs
Outdated
| pub fn json_metadata(&self, id: &BlockId<Block>) -> error::Result<String> { | ||
| self.executor.call(id, "json_metadata",&[]) | ||
| .and_then(|r| String::decode(&mut &r.return_data[..]) | ||
| .ok_or("Metadata decoding failed".into())) |
There was a problem hiding this comment.
check style guide on indentation. basically, it's only ever a single tab at a time, never ever mix tabs + spaces.
| } | ||
|
|
||
| impl_json_metadata!(for TestRuntime with modules | ||
| event_module::Module, |
gavofyork
left a comment
There was a problem hiding this comment.
CI fails because you're trying to use format! in the runtime. That's not allowed: format! brings way too much baggage with it. You'll need to either rearrange the macro to concat the &'static str fragments using concat! or pass them back to the client and do formatting in native code.
|
@gavofyork The wasm stuff is compiled with a nightly compiler and the native stuff is compiled with a stable compiler? Just asking, because I thought of using |
|
that's right - wasm with nightly (it doesn't compile using stable yet) |
|
Now, it compiles on wasm and native. |
|
|
||
| client.justify_and_import(BlockOrigin::Own, builder.bake().unwrap()).unwrap(); | ||
|
|
||
| assert_eq!(client.json_metadata(&BlockId::Number(1)).unwrap(), r#"{ "events": "events" }"#); |
There was a problem hiding this comment.
That just tests that the json_metadata function of the test-client is getting called.
| ) => { | ||
| impl $runtime { | ||
| pub fn json_metadata() -> $crate::metadata::Vec<$crate::metadata::JSONMetadata> { | ||
| __impl_json_metadata!($runtime; |
* Add LastRenominationOf Close paritytech#692 * Fix renominate tests * Build wasm
* Introduce Delta * Add VoteWeightBase * Upper bound of intention (paritytech#796) * Add UpperBoundFactor Close paritytech#672 * Check if the intention is nominating itself and add tests * Add set_upper_bound_factor and build wasm * Add LastRenominationOf (paritytech#794) * Add LastRenominationOf Close paritytech#692 * Fix renominate tests * Build wasm * genesis bitcoin (paritytech#799) genesis runtime wasm notice, do not copy wasm file into cli/src for develop! * Add MaxUnbondEntriesPerIntention (paritytech#800) * Add MaxUnbondEntriesPerIntention Close paritytech#681 * Add test * Nits * Nit * Pass tests * Replace settle_amount() with settle_and_set_amount() * Nit * Build wasm * Rename set_new_state to set_state * Rebuild wasm
No description provided.