Bastian Köcher
4dbc9265ee
Add execute_with to TestExternalities ( #3793 )
...
This function executes the given closure in a context where the test
externalities are set. This makes the srml tests easier to write, as the
test externalities need to be created anyway.
2019-10-10 15:01:30 +02:00
Xiliang Chen
34c7338211
Decouple randomness-collective-flip ( #3792 )
...
* Abstract Randomness trait
* bump version
* fix doc test
* simpify code a bit
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* fix tests
2019-10-10 12:41:42 +02:00
Bastian Köcher
8a39be474e
Move Externalities into its own crate ( #3775 )
...
* Move `Externalities` into `substrate-externalities`
- `Externalities` now support generic extensions
- Split of `primtives-storage` for storage primitive types
* Move the externalities scoping into `substrate-externalities`
* Fix compilation
* Review feedback
* Adds macro for declaring extensions
* Fix benchmarks
* Introduce `ExtensionStore` trait
* Last review comments
* Implement it for `ExtensionStore`
2019-10-09 15:50:30 +02:00
Ashley
968a30685f
Split off System random functions into a new Randomness module ( #3699 )
...
* split off system randomness functions into a new module
* bump spec and impl version
* Move randomness to bottom of construct_runtime calls, move initialization into on_initialize
* Update srml/randomness/Cargo.toml
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update srml/randomness/src/lib.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update srml/randomness/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update srml/randomness/Cargo.toml
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Improve system example
* Update Cargo.lock
* Fix randomness example
* Get rid of the stored index
* Add tests
* Add a random test
* Improve docs
* Fix executive test :^)
* Add a utility function to tests
* Update srml/randomness/Cargo.toml
Co-Authored-By: Gavin Wood <github@gavwood.com >
* Update srml/randomness/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update srml/randomness/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Change interpretation of block numbers
* rename crate
* refactor randomess module usage
* change random material len to a const
* Update srml/randomness-collective-flip/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update srml/randomness-collective-flip/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
2019-10-08 17:31:39 +02:00