Enhance decl storage (#777)

* enhance macro decl_storage()

* update the state root hash

* fix one comment
This commit is contained in:
guanqun
2018-10-05 20:20:32 +08:00
committed by Gav Wood
parent 200a716a1a
commit 1cc0e3b6ea
28 changed files with 2031 additions and 1459 deletions
+2
View File
@@ -29,6 +29,8 @@ extern crate serde;
extern crate sr_std as rstd;
extern crate sr_io as runtime_io;
#[cfg(feature = "std")]
pub extern crate sr_primitives as runtime_primitives;
extern crate substrate_metadata;
extern crate mashup;
+6 -2
View File
@@ -188,7 +188,11 @@ mod tests {
decl_storage! {
trait Store for Module<T: Trait> as TestStorage {
StorageMethod : u32;
StorageMethod : Option<u32>;
}
add_extra_genesis {
config(_marker) : ::std::marker::PhantomData<T>;
build(|_, _| {});
}
}
}
@@ -312,7 +316,7 @@ mod tests {
functions: DecodeDifferent::Encode(&[
StorageFunctionMetadata {
name: DecodeDifferent::Encode("StorageMethod"),
modifier: StorageFunctionModifier::None,
modifier: StorageFunctionModifier::Optional,
ty: StorageFunctionType::Plain(DecodeDifferent::Encode("u32")),
documentation: DecodeDifferent::Encode(&[]),
}
File diff suppressed because it is too large Load Diff