mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 06:31:09 +00:00
Initial mechanics for 80:20 fee split (#2912)
* Initial mechanics for 80:20 fee split Also: - Introduce extra functions for Imbalance manipulation; - Store treasury pot in an account, letting total issuance account for it. * Fix some tests * Fix some tests * Minor cleanups * Update parity-codec version (#2855) * Update parity-codec version * Update grandpa, rhododendron and trie-bench * Use primitive-types from crates.io * Bump impl version * Fix trie-bench version * Fix lock files * Fix versions * Update codec to 4.1 * merge fix * Revert merge * More reversions * Remove accidental code * Update locks * Bump runtime * Update locks * Tweaks and label TODO * Update srml/treasury/src/lib.rs Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com> * Update issue number * Update core/sr-primitives/src/traits.rs Co-Authored-By: Robert Habermeier <rphmeier@gmail.com> * Fix wasm build * Fix subkey build
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
//!
|
||||
//! This tracks the current author of the block and recent uncles.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use rstd::prelude::*;
|
||||
use rstd::collections::btree_set::BTreeSet;
|
||||
use srml_support::{decl_module, decl_storage, for_each_tuple, StorageValue};
|
||||
@@ -102,6 +104,15 @@ pub trait FilterUncle<Header, Author> {
|
||||
-> Result<(Option<Author>, Self::Accumulator), &'static str>;
|
||||
}
|
||||
|
||||
impl<H, A> FilterUncle<H, A> for () {
|
||||
type Accumulator = ();
|
||||
fn filter_uncle(_: &H, acc: Self::Accumulator)
|
||||
-> Result<(Option<A>, Self::Accumulator), &'static str>
|
||||
{
|
||||
Ok((None, acc))
|
||||
}
|
||||
}
|
||||
|
||||
/// A filter on uncles which verifies seals and does no additional checks.
|
||||
/// This is well-suited to consensus modes such as PoW where the cost of
|
||||
/// equivocating is high.
|
||||
@@ -201,8 +212,8 @@ decl_module! {
|
||||
|
||||
fn on_finalize() {
|
||||
// ensure we never go to trie with these values.
|
||||
let _ = <Self as Store>::Author::take();
|
||||
let _ = <Self as Store>::DidSetUncles::take();
|
||||
<Self as Store>::Author::kill();
|
||||
<Self as Store>::DidSetUncles::kill();
|
||||
}
|
||||
|
||||
/// Provide a set of uncles.
|
||||
|
||||
Reference in New Issue
Block a user