Sometimes we will need access to data about meta-elections that we have already decided, in order to detect some kinds of malice.
The task is to replace meta_votes: BTreeMap<Hash, BTreeMap<S:ublicId, Vec<MetaVote>>> with meta_votes: BTreeMap<Hash, BTreeMap<Hash, BTreeMap<S:ublicId, Vec<MetaVote>>>>, where the first hash is the hash of the last stable block at the point of consideration of the meta-election.
Every reference to self.meta_votes in Parsec will also have to be replaced with self.meta_votes.get(last_stable_block_hash).
To reduce duplication, we decided to replace both consensus_history and meta_votes with a single field:
where MetaElection is defined as follows:
(so it's essentially the meta-data we were storing before, a map event → peer → meta-votes).
Vec<MetaElection> might be extracted as a separate struct if it makes the code cleaner.