This PR wraps the `Snapshot`, `SnapshotMetadata` and `DesiredTargets`
storage items in the [EPM
pallet](https://paritytech.github.io/substrate/master/pallet_election_provider_multi_phase/index.html)
in order to keep them in sync throughout the election lifetime and in
order to be killed together.
Prior to this PR, these storage items were mutated in different places
in the pallet;
In addition 2 helper `fns` are introduced for chekcing if all the
wrapped storage items exist or not;
Fixes#413 ;
---------
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
The FRAME development environment provides modules (called "pallets") and support libraries that you can use, modify,
and extend to build the runtime logic to suit the needs of your blockchain.